Opened 11 years ago
Last modified 11 years ago
#21653 closed Bug
help_text attribute into TextField model is not converted to the title attribute — at Initial Version
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
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.attrstitle = field.help_text
Django 1.6.1
Note:
See TracTickets
for help on using tickets.