summaryrefslogtreecommitdiff
path: root/docs/ref/class-based-views/mixins-editing.txt
diff options
context:
space:
mode:
authorLuke Plant <L.Plant.98@cantab.net>2013-02-21 21:56:55 +0000
committerLuke Plant <L.Plant.98@cantab.net>2013-05-09 16:44:36 +0100
commitf026a519aea8f3ea7ca339bfbbb007e1ee0068b0 (patch)
tree882e594178a78d507ede36c2c9b0b8d5a9305561 /docs/ref/class-based-views/mixins-editing.txt
parent1e37cb37cec330a6b78925e2ef5589817428d09a (diff)
downloaddjango-f026a519aea8f3ea7ca339bfbbb007e1ee0068b0.tar.gz
Fixed #19733 - deprecated ModelForms without 'fields' or 'exclude', and added '__all__' shortcut
This also updates all dependent functionality, including modelform_factory and modelformset_factory, and the generic views `ModelFormMixin`, `CreateView` and `UpdateView` which gain a new `fields` attribute.
Diffstat (limited to 'docs/ref/class-based-views/mixins-editing.txt')
-rw-r--r--docs/ref/class-based-views/mixins-editing.txt12
1 files changed, 12 insertions, 0 deletions
diff --git a/docs/ref/class-based-views/mixins-editing.txt b/docs/ref/class-based-views/mixins-editing.txt
index 3f32269742..51d8628818 100644
--- a/docs/ref/class-based-views/mixins-editing.txt
+++ b/docs/ref/class-based-views/mixins-editing.txt
@@ -116,6 +116,18 @@ ModelFormMixin
by examining ``self.object`` or
:attr:`~django.views.generic.detail.SingleObjectMixin.queryset`.
+ .. attribute:: fields
+
+ .. versionadded:: 1.6
+
+ A list of names of fields. This is interpreted the same way as the
+ ``Meta.fields`` attribute of :class:`~django.forms.ModelForm`.
+
+ This is a required attribute if you are generating the form class
+ automatically (e.g. using ``model``). Omitting this attribute will
+ result in all fields being used, but this behaviour is deprecated
+ and will be removed in Django 1.8.
+
.. attribute:: success_url
The URL to redirect to when the form is successfully processed.