Skip to content

Commit db31523

Browse files
committed
data
1 parent 0665e45 commit db31523

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

examples/db_app.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
from fasthtml.all import *
22

3-
db = Database('todos.db')
3+
path = Path('data')
4+
path.mkdir(exist_ok=True)
5+
db = Database(path/'todos.db')
46
db.enable_wal()
57
todos = db.t.todos
68
if todos not in db.t: todos.create(id=int, title=str, done=bool, pk='id')

0 commit comments

Comments
 (0)