Order PublicationYear
s in descending order
This commit is contained in:
parent
7023cac661
commit
f0282eb9da
2 changed files with 22 additions and 0 deletions
19
mainsite/migrations/0005_auto_20170922_1916.py
Normal file
19
mainsite/migrations/0005_auto_20170922_1916.py
Normal file
|
@ -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']},
|
||||||
|
),
|
||||||
|
]
|
|
@ -87,3 +87,6 @@ class PublicationYear(models.Model):
|
||||||
@property
|
@property
|
||||||
def prettyName(self):
|
def prettyName(self):
|
||||||
return '{} – {}'.format(self.startYear, self.startYear+1)
|
return '{} – {}'.format(self.startYear, self.startYear+1)
|
||||||
|
|
||||||
|
class Meta:
|
||||||
|
ordering = ['-startYear']
|
||||||
|
|
Loading…
Reference in a new issue