Opened 16 years ago
Closed 14 years ago
#11059 closed (invalid)
Doc <-> Functionallity [FormsAPI Dynamic initial values] difference
Reported by: | bencoder | Owned by: | nobody |
---|---|---|---|
Component: | Forms | Version: | 1.0 |
Severity: | Keywords: | dynamic initial | |
Cc: | Triage Stage: | Accepted | |
Has patch: | no | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
Hi!
These values are only displayed for unbound forms, and they're not used as fallback values if a particular value isn't provided.
That's wrong. ModelForm.init-Code loads the data from the DB-Record into a Dict and updates that dict with the initial-dict.
So the initial values are always used, not just for unbound Forms.
thanks,
bencoder
Change History (3)
comment:1 by , 16 years ago
comment:2 by , 15 years ago
Triage Stage: | Unreviewed → Accepted |
---|
comment:3 by , 14 years ago
Resolution: | → invalid |
---|---|
Status: | new → closed |
You've misinterpreted the source. If a form is bound, initial data is ignored completely.
Note:
See TracTickets
for help on using tickets.
http://docs.djangoproject.com/en/1.0/ref/forms/api/#dynamic-initial-values