From c817ea85326202a81e1215c790427ed5b9777c78 Mon Sep 17 00:00:00 2001 From: Adam Goldsmith Date: Thu, 29 Apr 2021 14:01:07 -0400 Subject: [PATCH] Change certification definition naming scheme and define ordering --- paperwork/models.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/paperwork/models.py b/paperwork/models.py index 3b3915d..03ac08c 100644 --- a/paperwork/models.py +++ b/paperwork/models.py @@ -44,11 +44,12 @@ class CertificationDefinition(models.Model): department = models.CharField(db_column='Department', max_length=255, blank=True, null=True) def __str__(self): - return f"{self.department}: {self.certification_name}" + return f"{self.certification_name} <{self.department}>" class Meta: managed = False db_table = 'Certification Definitions' + ordering = ('certification_name', 'department') class Certification(models.Model):