Opened 9 years ago

Closed 3 years ago

#5749 closed New feature (fixed)

Add field_name as a key on the _html_output dict

Reported by: SmileyChris Owned by: e0ne
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 SmileyChris 9 years ago.

Download all attachments as: .zip

Change History (9)

Changed 9 years ago by SmileyChris

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

  • Has patch set
  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Triage Stage changed from Unreviewed to Design decision needed

comment:2 Changed 6 years ago by russellm

  • Triage Stage changed from Design decision needed to Accepted

comment:3 Changed 5 years ago by gabrielhurley

  • Severity set to Normal
  • Type set to New feature

comment:4 Changed 5 years ago by julien

  • Easy pickings unset
  • Needs tests set

comment:5 Changed 5 years ago by aaugustin

  • UI/UX unset

Change UI/UX from NULL to False.

comment:6 Changed 3 years ago by e0ne

I've updated patch and create test for it:

comment:7 Changed 3 years ago by e0ne

  • Owner changed from nobody to e0ne
  • Status changed from new to assigned

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

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

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