add auto_now field

This commit is contained in:
Sanj 2011-09-17 21:37:53 +05:30
parent 4efb595170
commit cc609943ac

View File

@ -1,11 +1,13 @@
from django.db import models from django.db import models
from django.contrib.auth.models import User from django.contrib.auth.models import User
from datetime import datetime
class ProductGroup(models.Model): class ProductGroup(models.Model):
url = models.URLField() url = models.URLField()
created_by = models.ForeignKey(User) created_by = models.ForeignKey(User)
name = models.CharField(max_length=255) name = models.CharField(max_length=255)
created_time = models.DateTimeField(default=datetime.now)
description = models.TextField(blank=True) description = models.TextField(blank=True)
end_time = models.DateTimeField() end_time = models.DateTimeField()
is_locked = models.BooleanField(default=False) is_locked = models.BooleanField(default=False)