class SingleObjectMixin(ContextMixin):
Known subclasses: django.views.generic.detail.BaseDetailView
, django.views.generic.edit.ModelFormMixin
Method | get_context_data |
Insert the single object into the context dict. |
Method | get_context_object_name |
Get the name to use for the object. |
Method | get_object |
Return the object the view is displaying. |
Method | get_queryset |
Return the QuerySet that will be used to look up the object. |
Method | get_slug_field |
Get the name of a slug field to be used to look up by slug. |
Class Variable | context_object_name |
Undocumented |
Class Variable | model |
Undocumented |
Class Variable | pk_url_kwarg |
Undocumented |
Class Variable | query_pk_and_slug |
Undocumented |
Class Variable | queryset |
Undocumented |
Class Variable | slug_field |
Undocumented |
Class Variable | slug_url_kwarg |
Undocumented |
Inherited from ContextMixin
:
Class Variable | extra_context |
Undocumented |
django.views.generic.dates.BaseDateDetailView
Return the object the view is displaying.
Require self.queryset
and a pk
or slug
argument in the URLconf.
Subclasses can override this to return any object.
Return the QuerySet
that will be used to look up the object.
This method is called by the default implementation of get_object() and may not be called if get_object() is overridden.