Opened 9 years ago

Closed 9 years ago

Last modified 9 years ago

#3025 closed enhancement (fixed)

[patch] Newforms - auto_id

Reported by: SmileyChris Owned by: adrian
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: UI/UX:

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)

newforms_autoid.patch (1.3 KB) - added by SmileyChris 9 years ago.
newforms_autoid.2.patch (1.4 KB) - added by SmileyChris 9 years ago.
sigh... save first, then patch…

Download all attachments as: .zip

Change History (5)

Changed 9 years ago by SmileyChris

Changed 9 years ago by SmileyChris

sigh... save first, then patch...

comment:1 Changed 9 years ago by SmileyChris

This also adds a helpful property pretty_name to BoundField so that templates can get the pretty name directly.

comment:2 Changed 9 years ago by adrian

  • Resolution set to fixed
  • Status changed from new to closed

(In [4073]) Fixed #3025 -- Added auto_id option to Form.init(). Thanks, SmileyChris

comment:3 Changed 9 years ago by adrian

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.

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