From: Jan Szejko Date: Mon, 16 Apr 2018 11:37:26 +0000 (+0200) Subject: better ordering of fundings X-Git-Url: https://git.mdrn.pl/wolnelektury.git/commitdiff_plain/0679f997bb4e0583f2425b0abd07186e44c26915?ds=inline;hp=c7d7cd5c30a60562f0a0294b9a42c8f5ef404e7a better ordering of fundings --- diff --git a/src/funding/migrations/0003_auto_20180416_1336.py b/src/funding/migrations/0003_auto_20180416_1336.py new file mode 100644 index 000000000..94485d732 --- /dev/null +++ b/src/funding/migrations/0003_auto_20180416_1336.py @@ -0,0 +1,18 @@ +# -*- coding: utf-8 -*- +from __future__ import unicode_literals + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('funding', '0002_auto_20151221_1225'), + ] + + operations = [ + migrations.AlterModelOptions( + name='funding', + options={'ordering': ['-payed_at', 'pk'], 'verbose_name': 'funding', 'verbose_name_plural': 'fundings'}, + ), + ] diff --git a/src/funding/models.py b/src/funding/models.py index 392666f24..b126c7681 100644 --- a/src/funding/models.py +++ b/src/funding/models.py @@ -241,7 +241,7 @@ class Funding(models.Model): class Meta: verbose_name = _('funding') verbose_name_plural = _('fundings') - ordering = ['-payed_at'] + ordering = ['-payed_at', 'pk'] @classmethod def payed(cls):