From 86b2e2f59732bb77d97909ccc9aa5b8c8dd016c5 Mon Sep 17 00:00:00 2001 From: Sanj Date: Wed, 31 Aug 2011 00:33:40 +0530 Subject: [PATCH] Relationship verbose_name to Relation --- gazetteer/places/models.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/gazetteer/places/models.py b/gazetteer/places/models.py index 31eccdc..6aaedc0 100644 --- a/gazetteer/places/models.py +++ b/gazetteer/places/models.py @@ -196,6 +196,12 @@ class Relationship(models.Model): feature2 = models.ForeignKey(Feature, related_name="feature_to") relationship_type = models.CharField(max_length=64, choices=RELATIONSHIP_CHOICES) + def __unicode__(self): + return "%s: %s to %s" % (self.relationship_type, self.feature1.preferred_name, self.feature2.preferred_name,) + + class Meta: + verbose_name = "Relation" + verbose_name_plural = "Relations" ''' class Place(models.Model):