class ContextMixin
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.
Descendants
- ArchiveIndexView
- BaseArchiveIndexView
- BaseCreateView
- BaseDateDetailView
- BaseDateListView
- BaseDayArchiveView
- BaseDeleteView
- BaseDetailView
- BaseFormView
- BaseListView
- BaseMonthArchiveView
- BaseTodayArchiveView
- BaseUpdateView
- BaseWeekArchiveView
- BaseYearArchiveView
- CreateView
- DateDetailView
- DayArchiveView
- DeleteView
- DetailView
- FormMixin
- FormView
- ListView
- LoginView
- LogoutView
- ModelFormMixin
- ModelFormMixin
- MonthArchiveView
- MultipleObjectMixin
- PasswordChangeDoneView
- PasswordChangeView
- PasswordResetCompleteView
- PasswordResetConfirmView
- PasswordResetDoneView
- PasswordResetView
- SingleObjectMixin
- TemplateView
- TodayArchiveView
- UpdateView
- WeekArchiveView
- YearArchiveView
Attributes
Defined in | |
---|---|
extra_context = None
|
ContextMixin |
Methods
def
get_context_data(self, **kwargs):
ContextMixin
¶
def
get_context_data(self, **kwargs):
ContextMixin
¶
23 24 25 26 27 28 | def get_context_data(self, **kwargs):
if 'view' not in kwargs:
kwargs['view'] = self
if self.extra_context is not None:
kwargs.update(self.extra_context)
return kwargs
|