#17228: params context variable from TemplateView is inconsistent with other
get_context_data implementations
--------------------------------------+------------------------------------
Reporter: ptone | Owner: nobody
Type: Cleanup/optimization | Status: new
Component: Generic views | Version: SVN
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
--------------------------------------+------------------------------------
Comment (by ptone):
I have inadvertently essentially duplicated this issue in #17381 however
there is a subtle difference.
My greater gripe is with taking all kwargs to get_context_data and
stuffing it into the params context variable.
If the legacy behavior is to be supported, it would be better IMO to have
the get method call self.get_context_data thusly:
{{{
context = self.get_context_data(params=kwargs)
}}}
instead of
{{{
context = self.get_context_data(**kwargs)
}}}
This would allow get_context_data to be called with other kwargs in a call
chain from a subclass without all those kwargs getting sucked into the
params context variable.
--
Ticket URL: <https://code.djangoproject.com/ticket/17228#comment:4>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/django-updates?hl=en.