#19878: Stop TemplateView automatically passing kwargs into the context
-------------------------------+------------------------------------
     Reporter:  void           |                    Owner:  nobody
         Type:  New feature    |                   Status:  new
    Component:  Generic views  |                  Version:  master
     Severity:  Normal         |               Resolution:
     Keywords:  django-sprint  |             Triage Stage:  Accepted
    Has patch:  0              |      Needs documentation:  0
  Needs tests:  0              |  Patch needs improvement:  0
Easy pickings:  0              |                    UI/UX:  0
-------------------------------+------------------------------------

Comment (by cjerdonek):

 Note that there is a distinction between //passing// `**kwargs` to
 `get_context_data()` and having `get_context_data()` //return//
 `**kwargs`.

 Personally, I would favor `TemplateView` continuing to pass `**kwargs` to
 `get_context_data()` even if its return value is changed by default not to
 include `kwargs`.  This would keep overriding `get_context_data()` simple
 because you can simply access `**kwargs` in the method without having to
 decide between `**kwargs` and `self.kwargs`.

 For consistency, I would like it if all generic views passed the full
 view's keyword arguments to `get_context_data()`.  Some classes like
 `ProcessFormView` restrict what is passed to `get_context_data()`, which
 was surprising to me because then `**kwargs` for the method differs from
 `self.kwargs`.  I just opened #21964 which is about this issue.

-- 
Ticket URL: <https://code.djangoproject.com/ticket/19878#comment:16>
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 unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/062.4d2c2846eb1b81de2914684ef1f4d1c1%40djangoproject.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to