Re: Why doesn't a forms.fields.DateField always return a datetime.date instance?

2014-03-04 Thread Peter Bengtsson
On Tuesday, March 4, 2014 5:19:17 PM UTC-8, Tom Evans wrote: > > On Tue, Mar 4, 2014 at 10:45 PM, Peter Bengtsson > > > 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, s

Re: Why doesn't a forms.fields.DateField always return a datetime.date instance?

2014-03-04 Thread Tom Evans
On Tue, Mar 4, 2014 at 10:45 PM, Peter Bengtsson 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,

Re: Why doesn't a forms.fields.DateField always return a datetime.date instance?

2014-03-04 Thread Peter Bengtsson
On Tuesday, March 4, 2014 12:47:03 PM UTC-8, Tom Evans wrote: > > On Tue, Mar 4, 2014 at 8:27 PM, Peter Bengtsson > > > wrote: > > I've been googling for an explanation but nothing's come up. > > > > See > > https://github.com/django/django/blob/master/django/forms/fields.py#L447 > > > >

Re: Why doesn't a forms.fields.DateField always return a datetime.date instance?

2014-03-04 Thread Tom Evans
On Tue, Mar 4, 2014 at 8:27 PM, Peter Bengtsson wrote: > I've been googling for an explanation but nothing's come up. > > See > https://github.com/django/django/blob/master/django/forms/fields.py#L447 > > If you use a `DateField` in your form, don't you expect it to produce a > `datetime.date` ins

Re: Why doesn't a forms.fields.DateField always return a datetime.date instance?

2014-03-04 Thread Tom Evans
On Tue, Mar 4, 2014 at 8:27 PM, Peter Bengtsson wrote: > I've been googling for an explanation but nothing's come up. > > See > https://github.com/django/django/blob/master/django/forms/fields.py#L447 > > If you use a `DateField` in your form, don't you expect it to produce a > `datetime.date` ins

Why doesn't a forms.fields.DateField always return a datetime.date instance?

2014-03-04 Thread Peter Bengtsson
I've been googling for an explanation but nothing's come up. See https://github.com/django/django/blob/master/django/forms/fields.py#L447 If you use a `DateField` in your form, don't you expect it to produce a `datetime.date` instance? E.g. class MyForm: start = forms.DateField() def