#4622: SelectDateWidget doesn't accept its as_hidden rendering
-------------------------------------------+--------------------------------
Reporter: Bill Fenner <[EMAIL PROTECTED]> | Owner: adrian
Status: new | Component: django.newforms
Version: SVN | Keywords:
Stage: Unreviewed | Has_patch: 1
-------------------------------------------+--------------------------------
An apparently little-known fact about widgets that implement
get_value_from_datadict is that they need to be able to accept whatever
the widget returns for its "as_hidden" value as input. Otherwise, a form
that uses as_hidden to propogate values from previous forms will fail:
{{{
>>> a = GetDate({'mydate_month':'4', 'mydate_day':'1',
'mydate_year':'2008'})
>>> print a['mydate'].as_hidden()
<input type="hidden" name="mydate" value="2008-4-1" id="id_mydate" />
>>> b=GetDate({'mydate':'2008-4-1'})
>>> print b.is_valid()
False
}}}
The attached diff has a fix for this problem, and a test.
--
Ticket URL: <http://code.djangoproject.com/ticket/4622>
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
-~----------~----~----~----~------~----~------~--~---