Closed qris closed 10 years ago
They're not included in Django, so also following the same style and not including them here. (Keeping exactly the same functionality but without the ugly-ass hard to understand style.) You'll need to override get_context_date yourself if you want this (you can do that as a mixin or base class if you want to only write it once)
I was wondering what happened to the
kwargs
passed to theget()
method. So I checkedTemplateView
and found this:I.e. the kwargs are completely ignored and discarded.
How about passing them to
get_context_data
instead? Then we can write our URLs with keyword argument placeholders:and those parameters will end up in our context, and hence available to the template, without any extra work.