diff --git a/iwm_browser/main.py b/iwm_browser/main.py index 01ab96a..2046143 100644 --- a/iwm_browser/main.py +++ b/iwm_browser/main.py @@ -38,7 +38,7 @@ async def root(): async def search( q: Union[str, None] = None, p: int = 0, - sort: str = "average_Rating", + sort: str = "average_rating", dir: str = "desc", date: int = -1 ): @@ -46,7 +46,9 @@ async def search( limit = 10 if p is None: p = 0 - + + # Passed to the template + QueryValues = {"q": q, "p": p, "sort": sort, "dir": dir, "date": date} searchResults = None if q is not None: @@ -115,12 +117,11 @@ async def search( entryNumber = None return template.render( - searchValue=searchValue, - searchPage=p, searchResults=searchResults, THUMB_URL=THUMB_URL, entryLimit=limit, - entryNumber=entryNumber + entryNumber=entryNumber, + QueryValues=QueryValues ) @app.get("/level/{level_id}", response_class=HTMLResponse) diff --git a/iwm_browser/templates/search.html b/iwm_browser/templates/search.html index 3b2b37f..6a49c34 100644 --- a/iwm_browser/templates/search.html +++ b/iwm_browser/templates/search.html @@ -27,7 +27,7 @@