On Tue, Mar 4, 2014 at 10:45 PM, Peter Bengtsson <
pet...@gmail.com> wrote:
> The link was to django master. So it's in all versions.
>
Well, that doesn't necessarily follow does it? It could have been
changed recently in trunk, say for 1.6 release. If you were using 1.5
it could be different. I haven't looked back, since you didn't
actually say what version you are using.
Trivially, in 1.6 at least, it works precisely as you expect:
>>> class A(forms.Form):
... s = forms.DateField()
... def clean_s(self):
... print repr(self.cleaned_data['s'])
... return self.cleaned_data['s']
...
>>> A(data={'s':'2012-12-25'}).is_valid()
datetime.date(2012, 12, 25)
True
Does this form also have a custom clean() method, is that doing
something silly with cleaned_data['start'] after the form field has
pythonized it and before your clean_start() method is called?
Cheers
Tom