#29921: Default BooleanField.required different from Django 2.0 when using 
choices
-------------------------------------+-------------------------------------
     Reporter:  bogdanbatog          |                    Owner:  nobody
         Type:  Bug                  |                   Status:  new
    Component:  Forms                |                  Version:  2.1
     Severity:  Normal               |               Resolution:
     Keywords:  BooleanField,        |             Triage Stage:
  widget, required                   |  Unreviewed
    Has patch:  0                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  0                    |                    UI/UX:  1
-------------------------------------+-------------------------------------

Comment (by bogdanbatog):

 Thanks for looking into it!
 I did another experiment and simply commented out the choices lines. Now,
 in Django2.1.2, the code prints False while it printed True with the
 choices lines. This may be also expected, because it renders a different
 widget? To me it's surprising. I wouldn't expect the required attribute of
 a form field to change depending on the widget it will render.
 It's also worth mentioning that Django2.0.6 is consistent and sets the
 field as not required both when using and not using choices.

-- 
Ticket URL: <https://code.djangoproject.com/ticket/29921#comment:2>
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].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/069.a3b1288f474450ee3db5cd2c12a89d51%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to