From da2770e1e3a06d68726f75eb17b5b7a043995a05 Mon Sep 17 00:00:00 2001 From: Sanj Date: Wed, 31 Aug 2011 00:28:25 +0530 Subject: [PATCH] sort authority record by preferred_name --- gazetteer/places/models.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/gazetteer/places/models.py b/gazetteer/places/models.py index 972708d..31eccdc 100644 --- a/gazetteer/places/models.py +++ b/gazetteer/places/models.py @@ -12,6 +12,9 @@ class AuthorityRecord(models.Model): uri = models.CharField(max_length=512) preferred_name = models.CharField(max_length=255) + class Meta: + ordering = ['preferred_name'] + def __unicode__(self): return self.preferred_name