Refactor search response to use named parameters and update search context test
This commit is contained in:
parent
afd2a0dd78
commit
fb4910430a
2 changed files with 7 additions and 8 deletions
|
|
@ -954,7 +954,7 @@ async def search(request: Request, query: str):
|
|||
"""
|
||||
reader.update_search()
|
||||
context = create_search_context(query)
|
||||
return templates.TemplateResponse("search.html", {"request": request, **context})
|
||||
return templates.TemplateResponse(request=request, name="search.html", context={"request": request, **context})
|
||||
|
||||
|
||||
@app.get("/post_entry", response_class=HTMLResponse)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue