Re: has_changed not working for Date field in modelForm

2011-02-10 Thread Sarang
Sorry, forgot to mention that after the above code change, has_changed() is indeed working properly! -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com. To unsubscribe from this gr

Re: has_changed not working for Date field in modelForm

2011-02-10 Thread Sarang
I changed the code in SelectDateWidget (django/forms/extras) to return month as '01' instead of '0'. I do not know if this problem is GAE specific. I would appreciate if someone from Django dev group confirms this issue and provides an appropriate fix. if y and m and d: if s

Re: Date Field in ModelForm

2009-09-14 Thread Jianjun
Thanks, It solve my question also. It's ok in Django 1.02, but after I migrate to 1.1, I meet the issue. On Sep 14, 1:43 am, Daniel Roseman wrote: > On Sep 9, 12:07 pm, mettwoch wrote: > > > Here is the definition of the field: > > >     date_due       = models.DateField(auto_now_add=True) > >

Re: Date Field in ModelForm

2009-09-13 Thread Daniel Roseman
On Sep 9, 12:07 pm, mettwoch wrote: > Here is the definition of the field: > >     date_due       = models.DateField(auto_now_add=True) I'd guess that the problem is the auto_now_add. When that's set, the field is not editable (because the date can only be set at creation). So the field is by de

Re: Date Field in ModelForm

2009-09-09 Thread mettwoch
Some more info: Windows Vista Django 1.1Final PostGreSQL 8.3.7 psycopg2 Python 2.5.4 mod_wsgi Apache2.2 On Sep 9, 12:57 pm, Daniel Roseman wrote: > On Sep 9, 11:49 am, mettwoch wrote: > > > > > Hi, > > > I don't understand why the following code produces an error (see > > below): > > > >>> fro

Re: Date Field in ModelForm

2009-09-09 Thread mettwoch
Here is the definition of the field: date_due = models.DateField(auto_now_add=True) On Sep 9, 12:57 pm, Daniel Roseman wrote: > On Sep 9, 11:49 am, mettwoch wrote: > > > > > Hi, > > > I don't understand why the following code produces an error (see > > below): > > > >>> from django

Re: Date Field in ModelForm

2009-09-09 Thread Daniel Roseman
On Sep 9, 11:49 am, mettwoch wrote: > Hi, > > I don't understand why the following code produces an error (see > below): > > > > >>> from django import forms > >>> from ishop.bo.models import Document > >>> d = Document.objects.get(pk=8) > >>> print d.date_due > 2009-08-28 > >>> class df(form

Date Field in ModelForm

2009-09-09 Thread mettwoch
Hi, I don't understand why the following code produces an error (see below): >>> from django import forms >>> from ishop.bo.models import Document >>> d = Document.objects.get(pk=8) >>> print d.date_due 2009-08-28 >>> class df(forms.ModelForm): >>> class Meta: >>> model = Documen