From c0db6927c99aebd3cb260395db2644959b8a3fc2 Mon Sep 17 00:00:00 2001 From: janmax <mail-github@jmx.io> Date: Thu, 13 Jul 2017 14:21:38 +0200 Subject: [PATCH] Hotfix: ordering of submissions is now always based on type name --- core/migrations/0015_auto_20170713_1220.py | 19 +++++++++++++++++++ core/models.py | 1 + 2 files changed, 20 insertions(+) create mode 100644 core/migrations/0015_auto_20170713_1220.py diff --git a/core/migrations/0015_auto_20170713_1220.py b/core/migrations/0015_auto_20170713_1220.py new file mode 100644 index 00000000..eb723098 --- /dev/null +++ b/core/migrations/0015_auto_20170713_1220.py @@ -0,0 +1,19 @@ +# -*- coding: utf-8 -*- +# Generated by Django 1.10.7 on 2017-07-13 12:20 +from __future__ import unicode_literals + +from django.db import migrations + + +class Migration(migrations.Migration): + + dependencies = [ + ('core', '0014_auto_20170712_1704'), + ] + + operations = [ + migrations.AlterModelOptions( + name='submission', + options={'ordering': ('type__name',), 'verbose_name': 'Submission', 'verbose_name_plural': 'Submission Set'}, + ), + ] diff --git a/core/models.py b/core/models.py index 31880da0..802b5fe3 100644 --- a/core/models.py +++ b/core/models.py @@ -225,6 +225,7 @@ class Submission(models.Model): verbose_name = "Submission" verbose_name_plural = "Submission Set" unique_together = (('type', 'student'),) + ordering = ('type__name',) def __str__(self): return "Submission of type '{}' from Student '{}'".format( -- GitLab