mirror of
https://github.com/django/django.git
synced 2025-10-24 06:06:09 +00:00
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.
This commit is contained in:
@@ -11,6 +11,7 @@ class AuthorForm(forms.ModelForm):
|
||||
|
||||
class Meta:
|
||||
model = Author
|
||||
fields = ['name', 'slug']
|
||||
|
||||
|
||||
class ContactForm(forms.Form):
|
||||
|
||||
Reference in New Issue
Block a user