#23580: forms.fields.NullBooleanField does not honor required=True -------------------------------+-------------------------------------- Reporter: jdufresne | Owner: nobody Type: Uncategorized | Status: closed Component: Forms | Version: master Severity: Normal | Resolution: invalid Keywords: | Triage Stage: Unreviewed Has patch: 1 | Needs documentation: 0 Needs tests: 0 | Patch needs improvement: 0 Easy pickings: 0 | UI/UX: 0 -------------------------------+-------------------------------------- Changes (by claudep):
* status: new => closed * resolution: => invalid Comment: I don't think excluding the validity of the `Unknown` choice when `required=True` is a good idea at all. I think that your use case is fulfilled by something like: {{{ forms.ChoiceField(widget=forms.RadioSelect, choices=((1, 'Yes'), (0, 'No')), required=True) }}} -- Ticket URL: <https://code.djangoproject.com/ticket/23580#comment:6> 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 django-updates+unsubscr...@googlegroups.com. To post to this group, send email to django-updates@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/django-updates/067.112aa09941e0e7e7490c34eff2c694ae%40djangoproject.com. For more options, visit https://groups.google.com/d/optout.