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
- 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
¶
29 30 31 32 33 | def get_context_data(self, **kwargs):
kwargs.setdefault("view", self)
if self.extra_context is not None:
kwargs.update(self.extra_context)
return kwargs
|