Default ordering changed
This commit is contained in:
parent
eebe16c8f5
commit
ca685d5879
2 changed files with 20 additions and 1 deletions
19
djangocms_blog/migrations/0031_auto_20170411_1719.py
Normal file
19
djangocms_blog/migrations/0031_auto_20170411_1719.py
Normal file
|
@ -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'},
|
||||||
|
),
|
||||||
|
]
|
|
@ -229,7 +229,7 @@ class Post(SortableMixin, KnockerModel, ModelMeta, TranslatableModel):
|
||||||
class Meta:
|
class Meta:
|
||||||
verbose_name = _('blog article')
|
verbose_name = _('blog article')
|
||||||
verbose_name_plural = _('blog articles')
|
verbose_name_plural = _('blog articles')
|
||||||
ordering = ('post_order', '-date_published', '-date_created')
|
ordering = ('-post_order', '-date_published', '-date_created')
|
||||||
get_latest_by = 'date_published'
|
get_latest_by = 'date_published'
|
||||||
|
|
||||||
def __str__(self):
|
def __str__(self):
|
||||||
|
|
Loading…
Add table
Reference in a new issue