From e4d535ea069eee0260b7c0cd3cb38ba2bdfb686b Mon Sep 17 00:00:00 2001 From: Sanj Date: Sun, 28 Aug 2011 01:54:57 +0530 Subject: [PATCH] authority record to feature is one-to-many not many-to-many --- gazetteer/places/models.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gazetteer/places/models.py b/gazetteer/places/models.py index 61fd922..2d2333f 100644 --- a/gazetteer/places/models.py +++ b/gazetteer/places/models.py @@ -6,13 +6,13 @@ from django.contrib.gis.db import models class AuthorityRecord(models.Model): uri = models.CharField(max_length=512) preferred_name = models.CharField(max_length=255) - features = models.ManyToManyField("Feature", blank=True) def __unicode__(self): return self.preferred_name class Feature(models.Model): + authority_record = models.ForeignKey(AuthorityRecord) url = models.CharField(max_length=512, unique=True, verbose_name="URI") preferred_name = models.CharField(max_length=512) feature_type = models.ForeignKey("FeatureType", null=True, blank=True)