views.generic.detail.SingleObjectMixin.pk_url_kwarg

pk_url_kwarg The name of the URLConf keyword argument that contains the primary key. By default, pk_url_kwarg is 'pk'.

views.generic.detail.SingleObjectMixin.queryset

queryset A QuerySet that represents the objects. If provided, the value of queryset supersedes the value provided for model. Warning queryset is a class attribute with a mutable value so care must be taken when using it directly. Before using it, either call its all() method or retrieve it with get_queryset() which takes care of the cloning behind the scenes.

views.generic.detail.SingleObjectMixin.query_pk_and_slug

query_pk_and_slug If True, causes get_object() to perform its lookup using both the primary key and the slug. Defaults to False. This attribute can help mitigate insecure direct object reference attacks. When applications allow access to individual objects by a sequential primary key, an attacker could brute-force guess all URLs; thereby obtaining a list of all objects in the application. If users with access to individual objects should be prevented from obtaining this list, setting query_p

views.generic.detail.SingleObjectMixin.slug_field

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

views.generic.detail.SingleObjectMixin.slug_url_kwarg

slug_url_kwarg The name of the URLConf keyword argument that contains the slug. By default, slug_url_kwarg is 'slug'.

views.generic.detail.SingleObjectTemplateResponseMixin

class django.views.generic.detail.SingleObjectTemplateResponseMixin A mixin class that performs template-based response rendering for views that operate upon a single object instance. Requires that the view it is mixed with provides self.object, the object instance that the view is operating on. self.object will usually be, but is not required to be, an instance of a Django model. It may be None if the view is in the process of constructing a new instance. Extends TemplateResponseMixin Met

views.generic.detail.SingleObjectTemplateResponseMixin.get_template_names()

get_template_names() Returns a list of candidate template names. Returns the following list: the value of template_name on the view (if provided) the contents of the template_name_field field on the object instance that the view is operating upon (if available) <app_label>/<model_name><template_name_suffix>.html

views.generic.detail.SingleObjectTemplateResponseMixin.template_name_field

template_name_field The field on the current object instance that can be used to determine the name of a candidate template. If either template_name_field itself or the value of the template_name_field on the current object instance is None, the object will not be used for a candidate template name.

views.generic.detail.SingleObjectTemplateResponseMixin.template_name_suffix

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

views.generic.edit.CreateView

class django.views.generic.edit.CreateView A view that displays a form for creating an object, redisplaying the form with validation errors (if there are any) and saving the object. Ancestors (MRO) This view inherits methods and attributes from the following views: django.views.generic.detail.SingleObjectTemplateResponseMixin django.views.generic.base.TemplateResponseMixin django.views.generic.edit.BaseCreateView django.views.generic.edit.ModelFormMixin django.views.generic.edit.FormMixin dj