summaryrefslogtreecommitdiff
path: root/examples/todo_sql/db.py
diff options
context:
space:
mode:
Diffstat (limited to 'examples/todo_sql/db.py')
-rw-r--r--examples/todo_sql/db.py12
1 files changed, 12 insertions, 0 deletions
diff --git a/examples/todo_sql/db.py b/examples/todo_sql/db.py
new file mode 100644
index 0000000..21f36fb
--- /dev/null
+++ b/examples/todo_sql/db.py
@@ -0,0 +1,12 @@
+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)