Doc cleanup for FormMixin.prefix; refs #18872.
This commit is contained in:
parent
9a2b07f1b4
commit
e10757ff4d
|
@ -151,6 +151,7 @@ FormView
|
||||||
* :attr:`~django.views.generic.edit.FormMixin.form_class` [:meth:`~django.views.generic.edit.FormMixin.get_form_class`]
|
* :attr:`~django.views.generic.edit.FormMixin.form_class` [:meth:`~django.views.generic.edit.FormMixin.get_form_class`]
|
||||||
* :attr:`~django.views.generic.base.View.http_method_names`
|
* :attr:`~django.views.generic.base.View.http_method_names`
|
||||||
* :attr:`~django.views.generic.edit.FormMixin.initial` [:meth:`~django.views.generic.edit.FormMixin.get_initial`]
|
* :attr:`~django.views.generic.edit.FormMixin.initial` [:meth:`~django.views.generic.edit.FormMixin.get_initial`]
|
||||||
|
* :attr:`~django.views.generic.edit.FormMixin.prefix` [:meth:`~django.views.generic.edit.FormMixin.get_prefix`]
|
||||||
* :attr:`~django.views.generic.base.TemplateResponseMixin.response_class` [:meth:`~django.views.generic.base.TemplateResponseMixin.render_to_response`]
|
* :attr:`~django.views.generic.base.TemplateResponseMixin.response_class` [:meth:`~django.views.generic.base.TemplateResponseMixin.render_to_response`]
|
||||||
* :attr:`~django.views.generic.edit.FormMixin.success_url` [:meth:`~django.views.generic.edit.FormMixin.get_success_url`]
|
* :attr:`~django.views.generic.edit.FormMixin.success_url` [:meth:`~django.views.generic.edit.FormMixin.get_success_url`]
|
||||||
* :attr:`~django.views.generic.base.TemplateResponseMixin.template_name` [:meth:`~django.views.generic.base.TemplateResponseMixin.get_template_names`]
|
* :attr:`~django.views.generic.base.TemplateResponseMixin.template_name` [:meth:`~django.views.generic.base.TemplateResponseMixin.get_template_names`]
|
||||||
|
@ -183,6 +184,7 @@ CreateView
|
||||||
* :attr:`~django.views.generic.edit.FormMixin.initial` [:meth:`~django.views.generic.edit.FormMixin.get_initial`]
|
* :attr:`~django.views.generic.edit.FormMixin.initial` [:meth:`~django.views.generic.edit.FormMixin.get_initial`]
|
||||||
* :attr:`~django.views.generic.detail.SingleObjectMixin.model`
|
* :attr:`~django.views.generic.detail.SingleObjectMixin.model`
|
||||||
* :attr:`~django.views.generic.detail.SingleObjectMixin.pk_url_kwarg`
|
* :attr:`~django.views.generic.detail.SingleObjectMixin.pk_url_kwarg`
|
||||||
|
* :attr:`~django.views.generic.edit.FormMixin.prefix` [:meth:`~django.views.generic.edit.FormMixin.get_prefix`]
|
||||||
* :attr:`~django.views.generic.detail.SingleObjectMixin.queryset` [:meth:`~django.views.generic.detail.SingleObjectMixin.get_queryset`]
|
* :attr:`~django.views.generic.detail.SingleObjectMixin.queryset` [:meth:`~django.views.generic.detail.SingleObjectMixin.get_queryset`]
|
||||||
* :attr:`~django.views.generic.base.TemplateResponseMixin.response_class` [:meth:`~django.views.generic.base.TemplateResponseMixin.render_to_response`]
|
* :attr:`~django.views.generic.base.TemplateResponseMixin.response_class` [:meth:`~django.views.generic.base.TemplateResponseMixin.render_to_response`]
|
||||||
* :attr:`~django.views.generic.detail.SingleObjectMixin.slug_field` [:meth:`~django.views.generic.detail.SingleObjectMixin.get_slug_field`]
|
* :attr:`~django.views.generic.detail.SingleObjectMixin.slug_field` [:meth:`~django.views.generic.detail.SingleObjectMixin.get_slug_field`]
|
||||||
|
@ -223,6 +225,7 @@ UpdateView
|
||||||
* :attr:`~django.views.generic.edit.FormMixin.initial` [:meth:`~django.views.generic.edit.FormMixin.get_initial`]
|
* :attr:`~django.views.generic.edit.FormMixin.initial` [:meth:`~django.views.generic.edit.FormMixin.get_initial`]
|
||||||
* :attr:`~django.views.generic.detail.SingleObjectMixin.model`
|
* :attr:`~django.views.generic.detail.SingleObjectMixin.model`
|
||||||
* :attr:`~django.views.generic.detail.SingleObjectMixin.pk_url_kwarg`
|
* :attr:`~django.views.generic.detail.SingleObjectMixin.pk_url_kwarg`
|
||||||
|
* :attr:`~django.views.generic.edit.FormMixin.prefix` [:meth:`~django.views.generic.edit.FormMixin.get_prefix`]
|
||||||
* :attr:`~django.views.generic.detail.SingleObjectMixin.queryset` [:meth:`~django.views.generic.detail.SingleObjectMixin.get_queryset`]
|
* :attr:`~django.views.generic.detail.SingleObjectMixin.queryset` [:meth:`~django.views.generic.detail.SingleObjectMixin.get_queryset`]
|
||||||
* :attr:`~django.views.generic.base.TemplateResponseMixin.response_class` [:meth:`~django.views.generic.base.TemplateResponseMixin.render_to_response`]
|
* :attr:`~django.views.generic.base.TemplateResponseMixin.response_class` [:meth:`~django.views.generic.base.TemplateResponseMixin.render_to_response`]
|
||||||
* :attr:`~django.views.generic.detail.SingleObjectMixin.slug_field` [:meth:`~django.views.generic.detail.SingleObjectMixin.get_slug_field`]
|
* :attr:`~django.views.generic.detail.SingleObjectMixin.slug_field` [:meth:`~django.views.generic.detail.SingleObjectMixin.get_slug_field`]
|
||||||
|
|
|
@ -39,7 +39,7 @@ FormMixin
|
||||||
|
|
||||||
.. versionadded:: 1.6
|
.. versionadded:: 1.6
|
||||||
|
|
||||||
Sets the :attr:`~django.forms.Form.prefix` for the generated form.
|
The :attr:`~django.forms.Form.prefix` for the generated form.
|
||||||
|
|
||||||
.. method:: get_initial()
|
.. method:: get_initial()
|
||||||
|
|
||||||
|
@ -64,6 +64,13 @@ FormMixin
|
||||||
request is a ``POST`` or ``PUT``, the request data (``request.POST``
|
request is a ``POST`` or ``PUT``, the request data (``request.POST``
|
||||||
and ``request.FILES``) will also be provided.
|
and ``request.FILES``) will also be provided.
|
||||||
|
|
||||||
|
.. method:: get_prefix()
|
||||||
|
|
||||||
|
.. versionadded:: 1.6
|
||||||
|
|
||||||
|
Determine the :attr:`~django.forms.Form.prefix` for the generated form.
|
||||||
|
Returns :attr:`~django.views.generic.edit.FormMixin.prefix` by default.
|
||||||
|
|
||||||
.. method:: get_success_url()
|
.. method:: get_success_url()
|
||||||
|
|
||||||
Determine the URL to redirect to when the form is successfully
|
Determine the URL to redirect to when the form is successfully
|
||||||
|
|
|
@ -330,6 +330,13 @@ Minor features
|
||||||
behavior of clearing filters by setting the
|
behavior of clearing filters by setting the
|
||||||
:attr:`~django.contrib.admin.ModelAdmin.preserve_filters` attribute to ``False``.
|
:attr:`~django.contrib.admin.ModelAdmin.preserve_filters` attribute to ``False``.
|
||||||
|
|
||||||
|
* Added
|
||||||
|
:meth:`FormMixin.get_prefix<django.views.generic.edit.FormMixin.get_prefix>`
|
||||||
|
(which returns
|
||||||
|
:attr:`FormMixin.prefix<django.views.generic.edit.FormMixin.prefix>` by
|
||||||
|
default) to allow customizing the :attr:`~django.forms.Form.prefix` of the
|
||||||
|
form.
|
||||||
|
|
||||||
Backwards incompatible changes in 1.6
|
Backwards incompatible changes in 1.6
|
||||||
=====================================
|
=====================================
|
||||||
|
|
||||||
|
@ -731,9 +738,6 @@ Miscellaneous
|
||||||
of the admin views. You should update your custom templates if they use the
|
of the admin views. You should update your custom templates if they use the
|
||||||
previous parameter name.
|
previous parameter name.
|
||||||
|
|
||||||
* Added :attr:`~django.views.generic.edit.FormMixin.prefix` to allow you to
|
|
||||||
customize the prefix on the form.
|
|
||||||
|
|
||||||
Features deprecated in 1.6
|
Features deprecated in 1.6
|
||||||
==========================
|
==========================
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue