Opened 11 years ago
Closed 11 years ago
#21599 closed New feature (duplicate)
Add a shortcut to edit HTML attribute on (model) forms
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.