from django.views.generic.base import ContextMixin
A default context mixin that passes the keyword arguments received by get_context_data() as the template context.
Определено в | |
---|---|
extra_context = None
|
ContextMixin |
23 24 25 26 27 | def get_context_data(self, **kwargs):
kwargs.setdefault('view', self)
if self.extra_context is not None:
kwargs.update(self.extra_context)
return kwargs
|