Opened 17 years ago

Closed 11 years ago

#5749 closed New feature (fixed)

Add field_name as a key on the _html_output dict

Reported by: Chris Beaven Owned by: Ivan Kolodyazhny
Component: Forms Version: dev
Severity: Normal Keywords:
Cc: Triage Stage: Accepted
Has patch: yes Needs documentation: no
Needs tests: yes Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

Just a small extension which I have found useful.

The use case is customising a field so that the row can be ided. For example:

class MyForm(Form):
    def as_p(self):
        return self._html_output(u'<p id="p_%(field_name)s">%(label)s %(field)s%(help_text)s</p>', u'%s', '</p>', u' %s', True)

Attachments (1)

5749.patch (1.0 KB ) - added by Chris Beaven 17 years ago.

Download all attachments as: .zip

Change History (9)

by Chris Beaven, 17 years ago

Attachment: 5749.patch added

comment:1 by Simon G <dev@…>, 16 years ago

Has patch: set
Triage Stage: UnreviewedDesign decision needed

comment:2 by Russell Keith-Magee, 14 years ago

Triage Stage: Design decision neededAccepted

comment:3 by Gabriel Hurley, 13 years ago

Severity: Normal
Type: New feature

comment:4 by Julien Phalip, 13 years ago

Easy pickings: unset
Needs tests: set

comment:5 by Aymeric Augustin, 12 years ago

UI/UX: unset

Change UI/UX from NULL to False.

comment:6 by Ivan Kolodyazhny, 11 years ago

I've updated patch and create test for it: https://github.com/django/django/pull/1610

comment:7 by Ivan Kolodyazhny, 11 years ago

Owner: changed from nobody to Ivan Kolodyazhny
Status: newassigned

comment:8 by Tim Graham <timograham@…>, 11 years ago

Resolution: fixed
Status: assignedclosed

In 053de6131af83c63ec17d38578889c71de913d24:

Fixed #5749 -- Added field_name as a key in the _html_output dict

Thanks SmileyChris for the suggestion.

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