Fixed #28331 -- Added ContextMixin.extra_context to allowing passing context in as_view().

This commit is contained in:
Bruno Alla 2017-07-06 15:34:54 +01:00 committed by Tim Graham
parent 42e91cd6f4
commit 604341c85f
8 changed files with 43 additions and 2 deletions

View file

@ -62,7 +62,8 @@ interface to working with templates in class-based views.
any data they want to ensure is in there as keyword arguments.
``get_context_data()`` returns a dictionary; in ``ContextMixin`` it
simply returns its keyword arguments, but it is common to override this to
add more members to the dictionary.
add more members to the dictionary. You can also use the
:attr:`~django.views.generic.base.ContextMixin.extra_context` attribute.
Building up Django's generic class-based views
==============================================