models.py silly errors - now validates

This commit is contained in:
Sanj 2011-09-17 21:45:01 +05:30
parent cc609943ac
commit 2f8d3ab0b1
2 changed files with 8 additions and 8 deletions

View File

@ -5,7 +5,7 @@ from datetime import datetime
class ProductGroup(models.Model):
url = models.URLField()
created_by = models.ForeignKey(User)
created_by = models.ForeignKey(User, related_name='created_group')
name = models.CharField(max_length=255)
created_time = models.DateTimeField(default=datetime.now)
description = models.TextField(blank=True)
@ -19,8 +19,8 @@ class ProductGroup(models.Model):
TIMELINE_CHOICES = (
('now', 'now'),
('10days' '10 days'),
('1month', '1 month'),
('10days', '10 days'),
('1month', '1 month')
)

View File

@ -1,16 +1,16 @@
from django.conf.urls.defaults import *
# Uncomment the next two lines to enable the admin:
# from django.contrib import admin
# admin.autodiscover()
from django.contrib import admin
admin.autodiscover()
urlpatterns = patterns('',
# Example:
# (r'^trubox/', include('trubox.foo.urls')),
(r'^$', 'deals.views.index'),
# Uncomment the admin/doc line below to enable admin documentation:
# (r'^admin/doc/', include('django.contrib.admindocs.urls')),
(r'^admin/doc/', include('django.contrib.admindocs.urls')),
# Uncomment the next line to enable the admin:
# (r'^admin/', include(admin.site.urls)),
(r'^admin/', include(admin.site.urls)),
)