summaryrefslogtreecommitdiff
path: root/examples/todo_wareweb/db.py
diff options
context:
space:
mode:
authorianb <devnull@localhost>2005-05-14 23:12:45 +0000
committerianb <devnull@localhost>2005-05-14 23:12:45 +0000
commit330dac21c0908b871fc73d9a17efefb7bd1e04be (patch)
treea30f8371508bf8ff03d8a7ecfa2e28ba9b0dfd41 /examples/todo_wareweb/db.py
parentc5b9dee9b6ce25ff35a1a06858be781d07de294f (diff)
downloadpaste-330dac21c0908b871fc73d9a17efefb7bd1e04be.tar.gz
Added Wareweb, a new framework. Yea for more frameworks\!
Diffstat (limited to 'examples/todo_wareweb/db.py')
-rw-r--r--examples/todo_wareweb/db.py16
1 files changed, 16 insertions, 0 deletions
diff --git a/examples/todo_wareweb/db.py b/examples/todo_wareweb/db.py
new file mode 100644
index 0000000..174f0f5
--- /dev/null
+++ b/examples/todo_wareweb/db.py
@@ -0,0 +1,16 @@
+from sqlobject import *
+
+class TodoList(SQLObject):
+
+ description = StringCol(notNull=True)
+ items = MultipleJoin('TodoItem')
+
+class TodoItem(SQLObject):
+
+ todo_list = ForeignKey('TodoList')
+ description = StringCol(notNull=True)
+ done = BoolCol(notNull=True, default=False)
+
+def check_db():
+ for soClass in (TodoList, TodoItem):
+ soClass.createTable(ifNotExists=True)