summaryrefslogtreecommitdiff
path: root/examples/todo_sql/db.py
blob: 21f36fba5b15d9b9f032543ad28c8d436b41bbbc (plain)
1
2
3
4
5
6
7
8
9
10
11
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)