diff options
| author | ianb <devnull@localhost> | 2005-05-14 23:12:45 +0000 |
|---|---|---|
| committer | ianb <devnull@localhost> | 2005-05-14 23:12:45 +0000 |
| commit | 330dac21c0908b871fc73d9a17efefb7bd1e04be (patch) | |
| tree | a30f8371508bf8ff03d8a7ecfa2e28ba9b0dfd41 /examples/todo_wareweb/db.py | |
| parent | c5b9dee9b6ce25ff35a1a06858be781d07de294f (diff) | |
| download | paste-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.py | 16 |
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) |
