Skip to content

Commit

Permalink
Update starlette/templating.py
Browse files Browse the repository at this point in the history
Co-authored-by: Marcelo Trylesinski <marcelotryle@gmail.com>
  • Loading branch information
alex-oleshkevich and Kludex authored Jul 10, 2023
1 parent c110b23 commit 0e9f58d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion starlette/templating.py
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,8 @@ def TemplateResponse(
else: # all arguments are kwargs
if "request" not in kwargs:
warnings.warn(
"TemplateResponse requires `request` keyword argument.",
"The `TemplateResponse` now requires the `request` argument.\n"
'Replace `TemplateResponse(name, {"context": context})` by `TemplateResponse(request, name)`.", # noqa: E501
DeprecationWarning,
)
if "request" not in kwargs.get("context", {}):
Expand Down

0 comments on commit 0e9f58d

Please sign in to comment.