Skip to content

Commit 9fc76d3

Browse files
committed
Update app.py
1 parent bc18107 commit 9fc76d3

File tree

1 file changed

+2
-2
lines changed
  • examples/applications/csv_editor

1 file changed

+2
-2
lines changed

examples/applications/csv_editor/app.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
@rt
1313
async def get_test_file():
1414
import httpx
15-
url = "https://raw.githubusercontent.com/AnswerDotAI/FastHTML-Gallery/main/applications/start_simple/csv_editor/ex_data.csv"
15+
url = "https://raw.githubusercontent.com/AnswerDotAI/FastHTML-Gallery/refs/heads/main/examples/applications/csv_editor/ex_data.csv"
1616
response = await httpx.AsyncClient().get(url)
1717
return Response(response.text, media_type="text/csv",
1818
headers={'Content-Disposition': 'attachment; filename="ex_data.csv"'})
@@ -30,7 +30,7 @@ def index(sess):
3030

3131
def render_row(row):
3232
vals = [Td(Input(value=v, name=k, oninput="this.classList.add('edited')")) for k,v in row.items()]
33-
vals.append(Td(Group(Button('delete', hx_delete=remove.rt(id=row['id']).lstrip('/')),
33+
vals.append(Td(Group(Button('delete', hx_delete=remove.to(id=row['id']).lstrip('/')),
3434
Button('update', hx_post='update', hx_include="closest tr"))))
3535
return Tr(*vals, hx_target='closest tr', hx_swap='outerHTML')
3636

0 commit comments

Comments
 (0)