From b8935b58f714ed1182e7441f5909d0560d40a7fe Mon Sep 17 00:00:00 2001 From: Jonathan Date: Thu, 12 Dec 2024 14:03:02 -0800 Subject: [PATCH] Applying some fixes from review Co-authored-by: Tim Schilling --- docs/ref/forms/models.txt | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/ref/forms/models.txt b/docs/ref/forms/models.txt index da1d63bfb5..285f2a7014 100644 --- a/docs/ref/forms/models.txt +++ b/docs/ref/forms/models.txt @@ -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