From 0679f997bb4e0583f2425b0abd07186e44c26915 Mon Sep 17 00:00:00 2001 From: Jan Szejko Date: Mon, 16 Apr 2018 13:37:26 +0200 Subject: [PATCH 1/1] better ordering of fundings --- .../migrations/0003_auto_20180416_1336.py | 18 ++++++++++++++++++ src/funding/models.py | 2 +- 2 files changed, 19 insertions(+), 1 deletion(-) create mode 100644 src/funding/migrations/0003_auto_20180416_1336.py 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): -- 2.20.1