remove unique

This commit is contained in:
Sanj 2012-02-24 20:04:18 +05:30
parent 72cdbf7bcf
commit e0956c28f1
2 changed files with 6 additions and 6 deletions

View File

@ -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

View File

@ -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)