On Jun 17, 6:40 am, Sheena wrote:
> Thanks
>
> The question is how do I populate a field with some other date, for
> example, there's a date of birth field that the auto stuff wont be
> ideal for...
> In the populate method i mentioned before, i passed the dob(date of
> birth) field a Date object
Here is DateField class
I think You will find all You need here
class DateField(Field):
description = _("Date (without time)")
empty_strings_allowed = False
default_error_messages = {
'invalid': _('Enter a valid date in -MM-DD format.'),
'invalid_date': _('Invalid
Your error is this...
def save(self,*args,**kwargs):
if not self.start_date:
self.start_date=models.DateField(datetime.date.today())
year=timedelta(days=365)
self.expire_date=models.DateField(datetime.date.today()
+year)
On Thu, Jun 17, 2010 at 8:40 AM, Sh
Thanks
The question is how do I populate a field with some other date, for
example, there's a date of birth field that the auto stuff wont be
ideal for...
In the populate method i mentioned before, i passed the dob(date of
birth) field a Date object initialized to something arbitrary. Does
the Dat
read about autofill_now=True and autofill=True
On Thu, Jun 17, 2010 at 8:14 AM, Sheena wrote:
> I've defined a number of models, one of which I've called
> MemberProfile that looks like this
>
> class MemberProfile(models.Model):
>postal_addr1=models.CharField(max_length=50, verbose_name="po
5 matches
Mail list logo