Opened 18 years ago
Closed 12 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)
Change History (9)
by , 18 years ago
| Attachment: | 5749.patch added |
|---|
comment:1 by , 18 years ago
| Has patch: | set |
|---|---|
| Triage Stage: | Unreviewed → Design decision needed |
comment:2 by , 15 years ago
| Triage Stage: | Design decision needed → Accepted |
|---|
comment:3 by , 15 years ago
| Severity: | → Normal |
|---|---|
| Type: | → New feature |
comment:4 by , 15 years ago
| Easy pickings: | unset |
|---|---|
| Needs tests: | set |
comment:5 by , 14 years ago
| UI/UX: | unset |
|---|
comment:6 by , 12 years ago
I've updated patch and create test for it: https://github.com/django/django/pull/1610
comment:7 by , 12 years ago
| Owner: | changed from to |
|---|---|
| Status: | new → assigned |
comment:8 by , 12 years ago
| Resolution: | → fixed |
|---|---|
| Status: | assigned → closed |
Note:
See TracTickets
for help on using tickets.
Change UI/UX from NULL to False.