Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge pull request #359 from nmartini/ticket_18832

Fixed #18832 - Updated ModelForm example fields to match note below
  • Loading branch information...
commit 76bd33539f8a188c4b1770babe6d2b55e5030c68 2 parents b139cfc + 5716989
@timgraham timgraham authored
Showing with 3 additions and 3 deletions.
  1. +3 −3 docs/topics/forms/modelforms.txt
View
6 docs/topics/forms/modelforms.txt
@@ -311,18 +311,18 @@ model fields:
to exclude from the form.
For example, if you want a form for the ``Author`` model (defined
-above) that includes only the ``name`` and ``title`` fields, you would
+above) that includes only the ``name`` and ``birth_date`` fields, you would
specify ``fields`` or ``exclude`` like this::
class PartialAuthorForm(ModelForm):
class Meta:
model = Author
- fields = ('name', 'title')
+ fields = ('name', 'birth_date')
class PartialAuthorForm(ModelForm):
class Meta:
model = Author
- exclude = ('birth_date',)
+ exclude = ('title',)
Since the Author model has only 3 fields, 'name', 'title', and
'birth_date', the forms above will contain exactly the same fields.
Please sign in to comment.
Something went wrong with that request. Please try again.