Opened 12 years ago
Closed 12 years ago
#21599 closed New feature (duplicate)
Add a shortcut to edit HTML attribute on (model) forms
| Reported by: | anonymous | Owned by: | nobody |
|---|---|---|---|
| Component: | Forms | Version: | dev |
| Severity: | Normal | Keywords: | |
| Cc: | Triage Stage: | Unreviewed | |
| Has patch: | no | Needs documentation: | no |
| Needs tests: | no | Patch needs improvement: | no |
| Easy pickings: | no | UI/UX: | no |
Description
We can already do :
labels = {
'name': _('Writer'),
}
help_texts = {
'name': _('Some useful help text.'),
}
error_messages = {
'name': {
'max_length': _("This writer's name is too long."),
},
}
Can we have something similar to add attributes to fields ? Settings up a widget or modifiying the field in the init is not only very verbose, but very very hard to figure out for newcomers.
Note:
See TracTickets
for help on using tickets.
Adding these attributes was a contentious issue and we're not going to be adding any more, see #17924.
We can definitely improve our documentation for modifying fields in
__init__, see #21319 for example.