mirror of
https://github.com/django/django.git
synced 2025-10-24 06:06:09 +00:00
Fixed #17228 -- params context variable is inconsistent
Remove the params variable from the context and just put the variables in directly. This had not been committed previously as the original pattern was used in the functional generic views and we wanted consistency between them, but django.views.generic.simple.direct_to_template is now gone so we can do it 'right'.
This commit is contained in:
committed by
Andrew Godwin
parent
212b9826bd
commit
f04bb6d798
@@ -144,6 +144,14 @@ year|date:"Y" }}``.
|
||||
``next_year`` and ``previous_year`` were also added in the context. They are
|
||||
calculated according to ``allow_empty`` and ``allow_future``.
|
||||
|
||||
Context in TemplateView
|
||||
~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
For consistency with the design of the other generic views,
|
||||
:class:`~django.views.generic.base.TemplateView` no longer passes a ``params``
|
||||
dictionary into the context, instead passing the variables from the URLconf
|
||||
directly into the context.
|
||||
|
||||
OPTIONS, PUT and DELETE requests in the test client
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
|
||||
Reference in New Issue
Block a user