Opened 13 years ago
Closed 13 years ago
#16589 closed Bug (worksforme)
ModelForm documentation error (saving unbound form)
Reported by: | 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 |
Description
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) >>> f.save()
Since the form is unbound, that f.save() is going to fail. Maybe that should be:
print f
Change History (2)
comment:1 by , 13 years ago
comment:2 by , 13 years ago
Resolution: | → worksforme |
---|---|
Status: | new → closed |
No reply => closing the ticket.
Note:
See TracTickets
for help on using tickets.
Since
ArticleForm
receives aninstance
argument, it is bound, isn't it? Did I miss something obvious?