views.generic.detail.SingleObjectMixin.slug_field
  • References/Python/Django/API/Single object mixins

slug_field The name of the field on the model that contains the slug. By default, slug_field is 'slug'

2025-01-10 15:47:30
views.generic.detail.SingleObjectTemplateResponseMixin.template_name_suffix
  • References/Python/Django/API/Single object mixins

template_name_suffix The suffix to append to the auto-generated candidate template name. Default suffix is _detail

2025-01-10 15:47:30
views.generic.detail.SingleObjectMixin.get_slug_field()
  • References/Python/Django/API/Single object mixins

get_slug_field() Returns the name of a slug field to be used to look up by slug. By default this simply returns the value of

2025-01-10 15:47:30
views.generic.detail.SingleObjectMixin.context_object_name
  • References/Python/Django/API/Single object mixins

context_object_name Designates the name of the variable to use in the context.

2025-01-10 15:47:30
views.generic.detail.SingleObjectTemplateResponseMixin
  • References/Python/Django/API/Single object mixins

class django.views.generic.detail.SingleObjectTemplateResponseMixin A mixin class that performs template-based response rendering

2025-01-10 15:47:30
views.generic.detail.SingleObjectMixin.query_pk_and_slug
  • References/Python/Django/API/Single object mixins

query_pk_and_slug If True, causes get_object() to perform its lookup using both the primary key and

2025-01-10 15:47:30
views.generic.detail.SingleObjectTemplateResponseMixin.template_name_field
  • References/Python/Django/API/Single object mixins

template_name_field The field on the current object instance that can be used to determine the name of a candidate template

2025-01-10 15:47:30
views.generic.detail.SingleObjectMixin.get_queryset()
  • References/Python/Django/API/Single object mixins

get_queryset() Returns the queryset that will be used to retrieve the object that this view will display. By default,

2025-01-10 15:47:30
views.generic.detail.SingleObjectTemplateResponseMixin.get_template_names()
  • References/Python/Django/API/Single object mixins

get_template_names() Returns a list of candidate template names. Returns the following list:

2025-01-10 15:47:30
views.generic.detail.SingleObjectMixin.queryset
  • References/Python/Django/API/Single object mixins

queryset A QuerySet that represents the objects. If provided, the value of queryset supersedes the

2025-01-10 15:47:30