Skip to content

Commit

Permalink
data
Browse files Browse the repository at this point in the history
  • Loading branch information
jph00 committed Jun 2, 2024
1 parent 0665e45 commit db31523
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion examples/db_app.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
from fasthtml.all import *

db = Database('todos.db')
path = Path('data')
path.mkdir(exist_ok=True)
db = Database(path/'todos.db')
db.enable_wal()
todos = db.t.todos
if todos not in db.t: todos.create(id=int, title=str, done=bool, pk='id')
Expand Down

0 comments on commit db31523

Please sign in to comment.