Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Doc cleanup for FormMixin.prefix; refs #18872.

  • Loading branch information...
commit e10757ff4dbbc1aedd09df6c542948409c49d75f 1 parent 9a2b07f
Tim Graham timgraham authored
3  docs/ref/class-based-views/flattened-index.txt
View
@@ -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.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.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.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`]
@@ -183,6 +184,7 @@ CreateView
* :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.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.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`]
@@ -223,6 +225,7 @@ UpdateView
* :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.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.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`]
9 docs/ref/class-based-views/mixins-editing.txt
View
@@ -39,7 +39,7 @@ FormMixin
.. 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()
@@ -64,6 +64,13 @@ FormMixin
request is a ``POST`` or ``PUT``, the request data (``request.POST``
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()
Determine the URL to redirect to when the form is successfully
10 docs/releases/1.6.txt
View
@@ -330,6 +330,13 @@ Minor features
behavior of clearing filters by setting the
: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
=====================================
@@ -731,9 +738,6 @@ Miscellaneous
of the admin views. You should update your custom templates if they use the
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
==========================
Please sign in to comment.
Something went wrong with that request. Please try again.