#20000: Allow overriding `label`, `help_text` and `error_messages` for the 
default
fields in `ModelForm`
-----------------------------+--------------------
     Reporter:  loic84       |      Owner:  loic84
         Type:  New feature  |     Status:  new
    Component:  Forms        |    Version:  master
     Severity:  Normal       |   Keywords:
 Triage Stage:  Unreviewed   |  Has patch:  1
Easy pickings:  0            |      UI/UX:  0
-----------------------------+--------------------
 Currently `ModelForm` requires to completely redefine fields in order to
 customize user-facing strings such as `labels`, `help_texts` and
 `error_messages`.

 This leads to a lot of boilerplate code to anyone who wants to customize
 these, but most importantly it's an error prone process. The bigger the
 ModelForm becomes, the more difficult it is to ensure functional parity
 between the `Model` fields and the `Form` fields for the critical parts
 such as blank/required, default, validators, etc.

 One shouldn't be at risk of completely breaking a form functionality in
 order to make small cosmetic changes.

 It's understood that we have to draw a line somewhere, else we would have
 field definitions in the `Meta`, but I believe that line should be drawn
 at "anything cosmetic" available through `Meta` overrides, and "anything
 functional" through fields overrides. I believe the currently provided
 `widgets` lie in between the two, so it's almost surprising that it was
 added as a convenience in a first place instead of the purely cosmetic
 options.

-- 
Ticket URL: <https://code.djangoproject.com/ticket/20000>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to