From aa7f280a00158bc437fe0211a802da0d65a50d14 Mon Sep 17 00:00:00 2001 From: Ivlev Denis Date: Tue, 6 Feb 2018 09:33:11 +0300 Subject: [PATCH] Add ordering for category model --- .../migrations/0021_auto_20180206_0632.py | 17 +++++++++++++++++ apps/course/models.py | 1 + 2 files changed, 18 insertions(+) create mode 100644 apps/course/migrations/0021_auto_20180206_0632.py diff --git a/apps/course/migrations/0021_auto_20180206_0632.py b/apps/course/migrations/0021_auto_20180206_0632.py new file mode 100644 index 00000000..f527bc4a --- /dev/null +++ b/apps/course/migrations/0021_auto_20180206_0632.py @@ -0,0 +1,17 @@ +# Generated by Django 2.0.2 on 2018-02-06 06:32 + +from django.db import migrations + + +class Migration(migrations.Migration): + + dependencies = [ + ('course', '0020_auto_20180202_1716'), + ] + + operations = [ + migrations.AlterModelOptions( + name='category', + options={'ordering': ['title'], 'verbose_name': 'Категория', 'verbose_name_plural': 'Категории'}, + ), + ] diff --git a/apps/course/models.py b/apps/course/models.py index 954a8160..76c46756 100644 --- a/apps/course/models.py +++ b/apps/course/models.py @@ -86,6 +86,7 @@ class Category(models.Model): class Meta: verbose_name = 'Категория' verbose_name_plural = 'Категории' + ordering = ['title'] class Lesson(models.Model):