Opened 10 years ago

Closed 10 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.

Change History (1)

comment:1 by Tim Graham, 10 years ago

Resolution: duplicate
Status: newclosed

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.

Note: See TracTickets for help on using tickets.
Back to Top