From ca685d5879eeebc42eff66633b2892765db02123 Mon Sep 17 00:00:00 2001 From: Dipen Patel Date: Tue, 11 Apr 2017 17:19:38 +0530 Subject: [PATCH] Default ordering changed --- .../migrations/0031_auto_20170411_1719.py | 19 +++++++++++++++++++ djangocms_blog/models.py | 2 +- 2 files changed, 20 insertions(+), 1 deletion(-) create mode 100644 djangocms_blog/migrations/0031_auto_20170411_1719.py diff --git a/djangocms_blog/migrations/0031_auto_20170411_1719.py b/djangocms_blog/migrations/0031_auto_20170411_1719.py new file mode 100644 index 0000000..958e889 --- /dev/null +++ b/djangocms_blog/migrations/0031_auto_20170411_1719.py @@ -0,0 +1,19 @@ +# -*- coding: utf-8 -*- +# Generated by Django 1.10.5 on 2017-04-11 11:49 +from __future__ import unicode_literals + +from django.db import migrations + + +class Migration(migrations.Migration): + + dependencies = [ + ('djangocms_blog', '0030_auto_20170411_1456'), + ] + + operations = [ + migrations.AlterModelOptions( + name='post', + options={'get_latest_by': 'date_published', 'ordering': ('-post_order', '-date_published', '-date_created'), 'verbose_name': 'blog article', 'verbose_name_plural': 'blog articles'}, + ), + ] diff --git a/djangocms_blog/models.py b/djangocms_blog/models.py index c8d832c..f86ee73 100644 --- a/djangocms_blog/models.py +++ b/djangocms_blog/models.py @@ -229,7 +229,7 @@ class Post(SortableMixin, KnockerModel, ModelMeta, TranslatableModel): class Meta: verbose_name = _('blog article') verbose_name_plural = _('blog articles') - ordering = ('post_order', '-date_published', '-date_created') + ordering = ('-post_order', '-date_published', '-date_created') get_latest_by = 'date_published' def __str__(self):