From 121662a1ab64ede9ddcb6271ae00f3e610a50201 Mon Sep 17 00:00:00 2001 From: Sanjay B Date: Wed, 11 Jun 2014 11:20:17 +0530 Subject: [PATCH] order languages by name --- itf/itfprofiles/models.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/itf/itfprofiles/models.py b/itf/itfprofiles/models.py index de4b32d..d886a17 100644 --- a/itf/itfprofiles/models.py +++ b/itf/itfprofiles/models.py @@ -275,7 +275,7 @@ class City(models.Model): class Meta: ordering = ['name'] - + def __unicode__(self): return self.name @@ -587,6 +587,9 @@ class Language(models.Model): code = models.CharField(max_length=3, db_index=True) name = models.CharField(max_length=255) + class Meta: + ordering = ['name'] + def __unicode__(self): return self.name