From 815089685e190537b41b4c90039b5078a0990fed Mon Sep 17 00:00:00 2001 From: Ivlev Denis Date: Mon, 5 Feb 2018 15:47:43 +0300 Subject: [PATCH] LIL-162. Add ordering for Content model --- .../migrations/0003_auto_20180205_1246.py | 17 +++++++++++++++++ apps/content/models.py | 1 + 2 files changed, 18 insertions(+) create mode 100644 apps/content/migrations/0003_auto_20180205_1246.py diff --git a/apps/content/migrations/0003_auto_20180205_1246.py b/apps/content/migrations/0003_auto_20180205_1246.py new file mode 100644 index 00000000..978f00b1 --- /dev/null +++ b/apps/content/migrations/0003_auto_20180205_1246.py @@ -0,0 +1,17 @@ +# Generated by Django 2.0.2 on 2018-02-05 12:46 + +from django.db import migrations + + +class Migration(migrations.Migration): + + dependencies = [ + ('content', '0002_auto_20180205_1212'), + ] + + operations = [ + migrations.AlterModelOptions( + name='content', + options={'ordering': ('-created_at',), 'verbose_name': 'Контент', 'verbose_name_plural': 'Контент'}, + ), + ] diff --git a/apps/content/models.py b/apps/content/models.py index 4f02e846..33a32f6f 100644 --- a/apps/content/models.py +++ b/apps/content/models.py @@ -28,6 +28,7 @@ class Content(PolymorphicModel): class Meta: verbose_name = 'Контент' verbose_name_plural = 'Контент' + ordering = ('-created_at',) class Image(Content):