From b3c6ebaa51ee0b6ac3ac0cc50095b05027bad163 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Valentin=20Grou=C3=A8s?= <valentin.groues@uni.lu> Date: Tue, 21 Mar 2017 13:25:49 +0100 Subject: [PATCH] #66 - appointment types lists shows a sorted list based on description field --- smash/web/models.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/smash/web/models.py b/smash/web/models.py index 03f784fc..fd125d47 100644 --- a/smash/web/models.py +++ b/smash/web/models.py @@ -322,11 +322,14 @@ class AppointmentType(models.Model): default='ANY' ) + class Meta: + ordering = ['description'] + def __str__(self): - return self.code + return self.description def __unicode__(self): - return self.code + return self.description class Worker(models.Model): -- GitLab