From aa9179e9caf3c28811f88c46883fb67e2bf0d450 Mon Sep 17 00:00:00 2001 From: Ivlev Denis Date: Tue, 13 Mar 2018 10:45:02 +0300 Subject: [PATCH] LIL-290. Add ordering to AuthorRequest model --- apps/user/migrations/0011_auto_20180313_0744.py | 17 +++++++++++++++++ apps/user/models.py | 5 +++++ 2 files changed, 22 insertions(+) create mode 100644 apps/user/migrations/0011_auto_20180313_0744.py diff --git a/apps/user/migrations/0011_auto_20180313_0744.py b/apps/user/migrations/0011_auto_20180313_0744.py new file mode 100644 index 00000000..3fe91ef7 --- /dev/null +++ b/apps/user/migrations/0011_auto_20180313_0744.py @@ -0,0 +1,17 @@ +# Generated by Django 2.0.3 on 2018-03-13 07:44 + +from django.db import migrations + + +class Migration(migrations.Migration): + + dependencies = [ + ('user', '0010_auto_20180312_1610'), + ] + + operations = [ + migrations.AlterModelOptions( + name='authorrequest', + options={'ordering': ('-created_at',), 'verbose_name': 'Заявка не преподавателя', 'verbose_name_plural': 'Заявки не преподавателя'}, + ), + ] diff --git a/apps/user/models.py b/apps/user/models.py index 9ce0e760..ae807779 100644 --- a/apps/user/models.py +++ b/apps/user/models.py @@ -122,3 +122,8 @@ class AuthorRequest(models.Model): update_at = models.DateTimeField(auto_now=True) objects = AuthorRequestManager() + + class Meta: + verbose_name = 'Заявка не преподавателя' + verbose_name_plural = 'Заявки не преподавателя' + ordering = ('-created_at',)