diff --git a/mainsite/migrations/0005_auto_20170922_1916.py b/mainsite/migrations/0005_auto_20170922_1916.py new file mode 100644 index 0000000..7c62cbf --- /dev/null +++ b/mainsite/migrations/0005_auto_20170922_1916.py @@ -0,0 +1,19 @@ +# -*- coding: utf-8 -*- +# Generated by Django 1.11.5 on 2017-09-22 17:16 +from __future__ import unicode_literals + +from django.db import migrations + + +class Migration(migrations.Migration): + + dependencies = [ + ('mainsite', '0004_publication_in_year_view_anyway'), + ] + + operations = [ + migrations.AlterModelOptions( + name='publicationyear', + options={'ordering': ['-startYear']}, + ), + ] diff --git a/mainsite/models.py b/mainsite/models.py index 74d5bda..af0fb85 100644 --- a/mainsite/models.py +++ b/mainsite/models.py @@ -87,3 +87,6 @@ class PublicationYear(models.Model): @property def prettyName(self): return '{} – {}'.format(self.startYear, self.startYear+1) + + class Meta: + ordering = ['-startYear']