#9609: (Null)BooleanField does not clean data correctly for MySQL with all widgets ---------------------------+------------------------------------------------ Reporter: psagers | Owner: nobody Status: new | Milestone: Component: Uncategorized | Version: SVN Keywords: | Stage: Unreviewed Has_patch: 1 | ---------------------------+------------------------------------------------ MySQL represents boolean values as 0 and 1, as the BooleanField documentation warns. This is not an issue when using a NullBooleanSelect widget, as NullBooleanSelect translates between model values and arbitrary integers for use in a form. However, not all choice widgets do this and thus they rely on the model values matching the widget values in order to populate initial widget state for rendering. The form field, in turn, must be able to clean the resulting form values. In order to support MySQL, therefore, (Null)BooleanField must understand '0' and '1'.
Ticket 7753 added support for using HiddenWidget with the boolean fields, which addresses the general problem of cleaning raw form values. The attached patch adds '0' and '1' to the list of recognized values. -- Ticket URL: <http://code.djangoproject.com/ticket/9609> Django <http://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 post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-updates?hl=en -~----------~----~----~----~------~----~------~--~---
