#3025 closed enhancement (fixed)
[patch] Newforms - auto_id
| Reported by: | Chris Beaven | Owned by: | Adrian Holovaty |
|---|---|---|---|
| Component: | contrib.admin | Version: | |
| Severity: | normal | Keywords: | |
| Cc: | Triage Stage: | Unreviewed | |
| Has patch: | yes | Needs documentation: | no |
| Needs tests: | no | Patch needs improvement: | no |
| Easy pickings: | no | UI/UX: | no |
Description
auto_id is a property for Forms. Off by default, set it as a string with a %s (such as 'id_%s' to match the oldforms format) to make the forms widgets use an id by default. You can retrieve a BoundFields auto id value via it's property auto_id.
Attachments (2)
Change History (5)
by , 19 years ago
| Attachment: | newforms_autoid.patch added |
|---|
by , 19 years ago
| Attachment: | newforms_autoid.2.patch added |
|---|
comment:1 by , 19 years ago
This also adds a helpful property pretty_name to BoundField so that templates can get the pretty name directly.
comment:2 by , 19 years ago
| Resolution: | → fixed |
|---|---|
| Status: | new → closed |
comment:3 by , 19 years ago
For the record, I made auto_id an argument to Form.__init__() rather than making it a class attribute so that it wouldn't prevent people from using a field named auto_id.
sigh... save first, then patch...