diff options
| author | Tim Graham <timograham@gmail.com> | 2014-03-21 20:44:34 -0400 |
|---|---|---|
| committer | Tim Graham <timograham@gmail.com> | 2014-03-22 07:56:48 -0400 |
| commit | ee4edb1eda2ac8f09eb298929282b44776930c89 (patch) | |
| tree | 385d5f30d927069256aa57d0b44ac377ac06dfcc /docs/topics/class-based-views | |
| parent | 1c8dbb0cc268c6a2edc8268776b440f64867e6fb (diff) | |
Made ModelForms raise ImproperlyConfigured if the list of fields is not specified.
Also applies to modelform(set)_factory and generic model views.
refs #19733.
Diffstat (limited to 'docs/topics/class-based-views')
| -rw-r--r-- | docs/topics/class-based-views/generic-editing.txt | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/docs/topics/class-based-views/generic-editing.txt b/docs/topics/class-based-views/generic-editing.txt index f12672df69..44680148ab 100644 --- a/docs/topics/class-based-views/generic-editing.txt +++ b/docs/topics/class-based-views/generic-editing.txt @@ -128,16 +128,15 @@ here; we don't have to write any logic ourselves:: We have to use :func:`~django.core.urlresolvers.reverse_lazy` here, not just ``reverse`` as the urls are not loaded when the file is imported. -.. versionchanged:: 1.6 +The ``fields`` attribute works the same way as the ``fields`` attribute on the +inner ``Meta`` class on :class:`~django.forms.ModelForm`. Unless you define the +form class in another way, the attribute is required and the view will raise +an :exc:`~django.core.exceptions.ImproperlyConfigured` exception if it's not. -In Django 1.6, the ``fields`` attribute was added, which works the same way as -the ``fields`` attribute on the inner ``Meta`` class on -:class:`~django.forms.ModelForm`. - -Omitting the fields attribute will work as previously, but is deprecated and -this attribute will be required from 1.8 (unless you define the form class in -another way). +.. versionchanged:: 1.8 + Omitting the ``fields`` attribute was previously allowed and resulted in a + form with all of the model's fields. Finally, we hook these new views into the URLconf:: |
