added db backup
Browse files
main.py
CHANGED
@@ -1,4 +1,5 @@
|
|
1 |
from fasthtml.common import *
|
|
|
2 |
|
3 |
app,rt,todos,Todo = fast_app(
|
4 |
'data/todos.db',
|
@@ -51,4 +52,6 @@ async def get(id:int):
|
|
51 |
target_id=tid(todo.id), hx_swap="outerHTML")
|
52 |
return Div(Div(todo.title), btn)
|
53 |
|
|
|
|
|
54 |
serve()
|
|
|
1 |
from fasthtml.common import *
|
2 |
+
from fasthtml_hf import setup_hf_backup
|
3 |
|
4 |
app,rt,todos,Todo = fast_app(
|
5 |
'data/todos.db',
|
|
|
52 |
target_id=tid(todo.id), hx_swap="outerHTML")
|
53 |
return Div(Div(todo.title), btn)
|
54 |
|
55 |
+
setup_hf_backup(app)
|
56 |
+
|
57 |
serve()
|