Add better post ordering
This commit is contained in:
parent
3d6afc6625
commit
cfd708f158
17
src/core/migrations/0008_alter_post_options.py
Normal file
17
src/core/migrations/0008_alter_post_options.py
Normal file
@ -0,0 +1,17 @@
|
||||
# Generated by Django 4.0.6 on 2022-07-22 19:15
|
||||
|
||||
from django.db import migrations
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('core', '0007_alter_post_recipients'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AlterModelOptions(
|
||||
name='post',
|
||||
options={'ordering': ['-updated_at', '-created_at']},
|
||||
),
|
||||
]
|
||||
@ -149,4 +149,4 @@ class Post(models.Model):
|
||||
return self.title
|
||||
|
||||
class Meta:
|
||||
ordering = ['-updated_at']
|
||||
ordering = ['-updated_at', '-created_at']
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user