1
0
mirror of https://github.com/django/django.git synced 2024-12-23 01:25:58 +00:00

Applying some fixes from review

Co-authored-by: Tim Schilling <schilling711@gmail.com>
This commit is contained in:
Jonathan 2024-12-12 14:03:02 -08:00 committed by GitHub
parent ba6a74d058
commit b8935b58f7
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -30,7 +30,7 @@ produced can be controlled by setting metadata options as attributes of an inner
# Example using some sort of Book model
from django.forms import ModelForm
from myLibraryApp.models import Book
from myapp.models import Book
class BookForm(ModelForm):
@ -52,9 +52,9 @@ produced can be controlled by setting metadata options as attributes of an inner
themselves, raise an error (though they might cause another error to be
raised if they affect a required attribute).
Other than :attr:`~ModelFormOptions.model` and at least one of
:attr:`~ModelFormOptions.fields` and :attr:`~ModelFormOptions.exclude`, ``Meta``
attributes are optional. It is **not** necessary for every option to be set for
:attr:`~ModelFormOptions.model` is required as well as either
:attr:`~ModelFormOptions.fields` or :attr:`~ModelFormOptions.exclude`.
All other ``Meta`` attributes are optional.
each ``Meta`` class, nor does every included field need to be included in every
option used. If an option isn't set, or if a model's field isn't used with a
particular option, Django will fall back on whatever has already been defined