Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

fixing modelforms example code, ticket #18832

  • Loading branch information...
commit 571698997f0ce3f362ee684754447e2e8a177863 1 parent b7d3b05
Nick Martini authored September 08, 2012

Showing 1 changed file with 3 additions and 3 deletions. Show diff stats Hide diff stats

  1. 6  docs/topics/forms/modelforms.txt
6  docs/topics/forms/modelforms.txt
@@ -311,18 +311,18 @@ model fields:
311 311
    to exclude from the form.
312 312
 
313 313
 For example, if you want a form for the ``Author`` model (defined
314  
-above) that includes only the ``name`` and ``title`` fields, you would
  314
+above) that includes only the ``name`` and ``birth_date`` fields, you would
315 315
 specify ``fields`` or ``exclude`` like this::
316 316
 
317 317
     class PartialAuthorForm(ModelForm):
318 318
         class Meta:
319 319
             model = Author
320  
-            fields = ('name', 'title')
  320
+            fields = ('name', 'birth_date')
321 321
 
322 322
     class PartialAuthorForm(ModelForm):
323 323
         class Meta:
324 324
             model = Author
325  
-            exclude = ('birth_date',)
  325
+            exclude = ('title',)
326 326
 
327 327
 Since the Author model has only 3 fields, 'name', 'title', and
328 328
 'birth_date', the forms above will contain exactly the same fields.

0 notes on commit 5716989

Please sign in to comment.
Something went wrong with that request. Please try again.