From 2f8d3ab0b135d92ab9a2f5c6c1594773fd42361e Mon Sep 17 00:00:00 2001 From: Sanj Date: Sat, 17 Sep 2011 21:45:01 +0530 Subject: [PATCH] models.py silly errors - now validates --- trubox/deals/models.py | 6 +++--- trubox/urls.py | 10 +++++----- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/trubox/deals/models.py b/trubox/deals/models.py index 0ab958a..6758015 100644 --- a/trubox/deals/models.py +++ b/trubox/deals/models.py @@ -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') ) diff --git a/trubox/urls.py b/trubox/urls.py index 8559646..4ed4c93 100644 --- a/trubox/urls.py +++ b/trubox/urls.py @@ -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)), )