diff options
| author | Marc Tamlyn <marc.tamlyn@gmail.com> | 2012-08-18 12:52:05 +0100 |
|---|---|---|
| committer | Andrew Godwin <andrew@aeracode.org> | 2012-08-18 15:07:21 +0100 |
| commit | f04bb6d798b07aa5e7c1d99d700fa6ddc7d39e62 (patch) | |
| tree | ebb09a427a6f1fb36618877bcbdeb033f8fb5393 /django | |
| parent | 212b9826bdda5c3c2eb680e6f9c5b046b4172300 (diff) | |
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'.
Diffstat (limited to 'django')
| -rw-r--r-- | django/views/generic/base.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/django/views/generic/base.py b/django/views/generic/base.py index ca039ae9db..e11412ba4d 100644 --- a/django/views/generic/base.py +++ b/django/views/generic/base.py @@ -142,11 +142,11 @@ class TemplateResponseMixin(object): class TemplateView(TemplateResponseMixin, ContextMixin, View): """ - A view that renders a template. This view is different from all the others - insofar as it also passes ``kwargs`` as ``params`` to the template context. + A view that renders a template. This view will also pass into the context + any keyword arguments passed by the url conf. """ def get(self, request, *args, **kwargs): - context = self.get_context_data(params=kwargs) + context = self.get_context_data(**kwargs) return self.render_to_response(context) |
