From 58a4c6ca6c6b5b4e0bf96983a76ae52e098cb0fc Mon Sep 17 00:00:00 2001 From: "J.-S. Caux" <J.S.Caux@uva.nl> Date: Sat, 26 Jan 2019 21:21:27 +0100 Subject: [PATCH] Add ordering to scipost:Remark --- scipost/migrations/0021_auto_20190126_2120.py | 19 +++++++++++++++++++ scipost/models.py | 1 + 2 files changed, 20 insertions(+) create mode 100644 scipost/migrations/0021_auto_20190126_2120.py diff --git a/scipost/migrations/0021_auto_20190126_2120.py b/scipost/migrations/0021_auto_20190126_2120.py new file mode 100644 index 000000000..e5b4c50c4 --- /dev/null +++ b/scipost/migrations/0021_auto_20190126_2120.py @@ -0,0 +1,19 @@ +# -*- coding: utf-8 -*- +# Generated by Django 1.11.4 on 2019-01-26 20:20 +from __future__ import unicode_literals + +from django.db import migrations + + +class Migration(migrations.Migration): + + dependencies = [ + ('scipost', '0020_auto_20190126_2058'), + ] + + operations = [ + migrations.AlterModelOptions( + name='remark', + options={'ordering': ['date']}, + ), + ] diff --git a/scipost/models.py b/scipost/models.py index a007d12c8..43f42fb92 100644 --- a/scipost/models.py +++ b/scipost/models.py @@ -178,6 +178,7 @@ class Remark(models.Model): class Meta: default_related_name = 'remarks' + ordering = ['date'] def __str__(self): return (self.contributor.user.first_name + ' ' -- GitLab