Opened 11 years ago

Closed 5 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: master
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


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 11 years ago.

Download all attachments as: .zip

Change History (9)

Changed 11 years ago by Chris Beaven

Attachment: 5749.patch added

comment:1 Changed 11 years ago by Simon G <dev@…>

Has patch: set
Triage Stage: UnreviewedDesign decision needed

comment:2 Changed 8 years ago by Russell Keith-Magee

Triage Stage: Design decision neededAccepted

comment:3 Changed 8 years ago by Gabriel Hurley

Severity: Normal
Type: New feature

comment:4 Changed 8 years ago by Julien Phalip

Easy pickings: unset
Needs tests: set

comment:5 Changed 7 years ago by Aymeric Augustin

UI/UX: unset

Change UI/UX from NULL to False.

comment:6 Changed 5 years ago by Ivan Kolodyazhny

I've updated patch and create test for it:

comment:7 Changed 5 years ago by Ivan Kolodyazhny

Owner: changed from nobody to Ivan Kolodyazhny
Status: newassigned

comment:8 Changed 5 years ago by Tim Graham <timograham@…>

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