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 1dc2743 commit c110b23
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion starlette/templating.py
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,9 @@ def TemplateResponse(
args[0], str
): # the first argument is template name (old style)
warnings.warn(
"Argument 1 of TemplateResponse must be a Request instance.",
"The `name` is not the first parameter anymore. "
"The first parameter should be the `Request` instance.\n"
'Replace `TemplateResponse(name, {"request": request})` by `TemplateResponse(request, name)`.', # noqa: E501
DeprecationWarning,
)

Expand Down

0 comments on commit c110b23

Please sign in to comment.