#6209: when you give a boolean field in Form preview, and you give the boolean
field "False" value, Django will not commit rightly
-----------------------------------------------+----------------------------
Reporter: [EMAIL PROTECTED] | Owner: nobody
Status: reopened | Milestone:
Component: django.contrib.formtools | Version: SVN
Resolution: | Keywords: preview form
Stage: Unreviewed | Has_patch: 0
Needs_docs: 0 | Needs_tests: 0
Needs_better_patch: 0 |
-----------------------------------------------+----------------------------
Changes (by [EMAIL PROTECTED]):
* cc: [EMAIL PROTECTED] (added)
* status: closed => reopened
* resolution: invalid =>
Comment:
I've also hit this problem.
I have a field, `beta_test = BooleanField(required=False)`.
When I submit the form with the checkbox unticked, the preview renders as
I expect: the template snippet "`{% if form.beta_test.data %}True{% else
%}False{% endif %}, {{ form.beta_test.data }}`" renders as "`False,
False`".
However, when I confirm the submission, the preview page is re-rendered,
the previous snippet rendering "`True, False`"; the contents of the
`<form>`, with the exception of the `hash` field, are identical but for
the ordering of attributes within the various `<input>` fields.
If the field is ticked for the original preview, the submission works as
expected first time (the preview snippet producing "`True, on`").
--
Ticket URL: <http://code.djangoproject.com/ticket/6209#comment:5>
Django Code <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
-~----------~----~----~----~------~----~------~--~---