Opened 9 years ago

Closed 9 years ago

#16589 closed Bug (worksforme)

ModelForm documentation error (saving unbound form)

Reported by: toby@… Owned by: nobody
Component: Documentation Version: 1.3
Severity: Normal Keywords:
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no


The ModelForm documentation has the following snippet:

# Create a form to edit an existing Article. 
>>> a = Article.objects.get(pk=1) 
>>> f = ArticleForm(instance=a) 

Since the form is unbound, that is going to fail. Maybe that should be:

print f

Change History (2)

comment:1 Changed 9 years ago by Aymeric Augustin

Since ArticleForm receives an instance argument, it is bound, isn't it? Did I miss something obvious?

comment:2 Changed 9 years ago by Aymeric Augustin

Resolution: worksforme
Status: newclosed

No reply => closing the ticket.

Note: See TracTickets for help on using tickets.
Back to Top