Skip to content

Commit 439fdf4

Browse files
Auto-update API lists and context files
1 parent 6bcd8d7 commit 439fdf4

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

llms_ctx.txt

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -530,8 +530,8 @@ def show_contacts(contacts: list[dict]):
530530
return [Tr(*[Td(contact[col]) for col in keys]) for contact in contacts]
531531

532532
# POST request to handle search
533-
@rt("/search")
534-
def post(search: str = None):
533+
@rt
534+
def search(search: str = None):
535535
# Default search term is empty string, which shows all contacts
536536
# If a search term is provided, it is converted to lowercase
537537
search_term = search.lower() if search else ""
@@ -548,7 +548,6 @@ def post(search: str = None):
548548
def index():
549549
return Titled("Active Search",
550550
Div(
551-
552551
H3("Search Contacts"),
553552
# HTMX for searching contacts
554553
Input(
@@ -559,7 +558,7 @@ def index():
559558
# Input is of a form type
560559
class_="form-control",
561560
# A POST request to '/search' is called when the user types
562-
hx_post="/search",
561+
post=search,
563562
# Search is delayed by 500ms to delay the search until the user has stopped typing
564563
# 'changed' is to ensure that no new search are triggered when the
565564
# user doesn't change the input of pastes the same value.

0 commit comments

Comments
 (0)