#33818: BaseListView get(...) loose kwargs calling self.get_context_data
-----------------------------------------+------------------------------
               Reporter:  mariosgn       |          Owner:  nobody
                   Type:  Bug            |         Status:  new
              Component:  Generic views  |        Version:  4.0
               Severity:  Normal         |       Keywords:  BaseListView
           Triage Stage:  Unreviewed     |      Has patch:  1
    Needs documentation:  0              |    Needs tests:  0
Patch needs improvement:  0              |  Easy pickings:  0
                  UI/UX:  0              |
-----------------------------------------+------------------------------
 In BaseListView in /views/generic/list.py the `get` function does not pass
 `('**kwargs')`        to `self.get_context_data` at line 174.

 {{{
         context = self.get_context_data()
         return self.render_to_response(context)
 }}}
 I believe should be
 {{{
         context = self.get_context_data(**kwargs)
         return self.render_to_response(context)
 }}}

 In my code there is this url pointing to a ListView
 {{{
 path('device/<int:device_id>/history', MyListView.as_view(),
 name='my_view_name'),
 }}}
 and in the ListView the ```device_id``` is lost unless I add the
 ```**kwargs``` as shown above

-- 
Ticket URL: <https://code.djangoproject.com/ticket/33818>
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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/01070181ba02c3dc-c9e74f75-be6a-4621-b85c-8a3f777397bf-000000%40eu-central-1.amazonses.com.

Reply via email to