Opened 12 years ago
Closed 12 years ago
#21653 closed Bug (invalid)
help_text attribute into TextField model is not converted to the title attribute
| Reported by: | Owned by: | nobody | |
|---|---|---|---|
| Component: | Forms | Version: | 1.6 |
| Severity: | Normal | Keywords: | help_text, TextField |
| Cc: | Triage Stage: | Unreviewed | |
| Has patch: | no | Needs documentation: | no |
| Needs tests: | no | Patch needs improvement: | no |
| Easy pickings: | no | UI/UX: | no |
Description (last modified by )
help_text attribute into a TextField model is not converted to the title attribute textarea into html-page!
I fixed this by using __init__ into MyModelForm
class MyModelForm(ModelForm):
def __init__(self, *args, **kwargs): # filtered queryset in foreignkey choice field
super(GenericModelForm, self).__init__(*args, **kwargs)
for field in self.Meta.model._meta.fields:
if field.get_internal_type() == "TextField":
self.fields[field.name].widget.attrs['title'] = field.help_text
Django 1.6.1
Change History (3)
comment:1 by , 12 years ago
| Description: | modified (diff) |
|---|
comment:3 by , 12 years ago
| Resolution: | → invalid |
|---|---|
| Status: | new → closed |
Note:
See TracTickets
for help on using tickets.
I don't see why this is a bug -- could you explain?