diff --git a/docs/ref/class-based-views/flattened-index.txt b/docs/ref/class-based-views/flattened-index.txt index 7634a07300..272c852181 100644 --- a/docs/ref/class-based-views/flattened-index.txt +++ b/docs/ref/class-based-views/flattened-index.txt @@ -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`] diff --git a/docs/ref/class-based-views/mixins-editing.txt b/docs/ref/class-based-views/mixins-editing.txt index 23b781c2e4..bf1c10df13 100644 --- a/docs/ref/class-based-views/mixins-editing.txt +++ b/docs/ref/class-based-views/mixins-editing.txt @@ -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 diff --git a/docs/releases/1.6.txt b/docs/releases/1.6.txt index 086c10c389..5d1a37ac53 100644 --- a/docs/releases/1.6.txt +++ b/docs/releases/1.6.txt @@ -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` + (which returns + :attr:`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 ==========================