misc: add default ordering for categories (#41628)
This commit is contained in:
parent
d57bfbccc1
commit
1ed52fd7a1
|
@ -0,0 +1,19 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
# Generated by Django 1.11.17 on 2020-04-13 18:54
|
||||
from __future__ import unicode_literals
|
||||
|
||||
from django.db import migrations
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('corbo', '0011_auto_20180426_1334'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AlterModelOptions(
|
||||
name='category',
|
||||
options={'ordering': ['name']},
|
||||
),
|
||||
]
|
|
@ -31,6 +31,9 @@ class Category(models.Model):
|
|||
help_text=_('if defined, announces will be automatically created from rss items'))
|
||||
ctime = models.DateTimeField(auto_now_add=True)
|
||||
|
||||
class Meta:
|
||||
ordering = ['name']
|
||||
|
||||
def __unicode__(self):
|
||||
return self.name
|
||||
|
||||
|
|
Reference in New Issue