{{{
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.
* owner: nobody => ziyad00
* status: new => assigned
--
Ticket URL: <https://code.djangoproject.com/ticket/33818#comment:1>
* status: assigned => closed
* resolution: => duplicate
Comment:
Duplicate of #17242. The current behavior is intended. `TemplateView` adds
`kwargs` to context, but there's no plan to add that behavior to other
views (see #19878).
--
Ticket URL: <https://code.djangoproject.com/ticket/33818#comment:2>