From e0956c28f126136532a33446aa1384787ce8347c Mon Sep 17 00:00:00 2001 From: Sanj Date: Fri, 24 Feb 2012 20:04:18 +0530 Subject: [PATCH] remove unique --- indianrails/settings.py | 2 +- indianrails/trains/models.py | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/indianrails/settings.py b/indianrails/settings.py index 41e295d..79294ad 100644 --- a/indianrails/settings.py +++ b/indianrails/settings.py @@ -7,7 +7,7 @@ from os.path import join SITENAME = 'indianrails' PROJECT_ROOT = os.path.normpath(os.path.dirname(__file__)) - +DATA_DIR = join(PROJECT_ROOT, "../data") DEBUG = True TEMPLATE_DEBUG = DEBUG JSON_DEBUG = False diff --git a/indianrails/trains/models.py b/indianrails/trains/models.py index ff17d9a..25ef0f3 100644 --- a/indianrails/trains/models.py +++ b/indianrails/trains/models.py @@ -1,20 +1,20 @@ from django.contrib.gis.db import models - +''' class State(models.Model): name = models.CharField(max_length=255) polygon = models.PolygonField(null=True) def __unicode__(self): return self.name - +''' class Station(models.Model): data_id = models.IntegerField() #id in the source data code = models.CharField(max_length=10, unique=True, db_index=True) name = models.CharField(max_length=255) zone = models.CharField(max_length=10) - state = models.ForeignKey(State) + state = models.CharField(max_length=255, blank=True) address = models.TextField() point = models.PointField(null=True) @@ -25,8 +25,8 @@ class Station(models.Model): class Train(models.Model): data_id = models.IntegerField() name = models.CharField(max_length=255) - number = models.CharField(max_length=12, unique=True, db_index=True) - return_train = models.CharField(max_length=12, unique=True, db_index=True) + number = models.CharField(max_length=12, db_index=True) + return_train = models.CharField(max_length=12, db_index=True) duration_h = models.IntegerField() duration_m = models.IntegerField() zone = models.CharField(max_length=10)