From 390ffb371bf200ea227a0eca308d75c50bc58291 Mon Sep 17 00:00:00 2001 From: Ivlev Denis Date: Thu, 15 Feb 2018 18:23:57 +0300 Subject: [PATCH] Course slug nullable --- .../migrations/0014_auto_20180215_1503.py | 17 +++++++++++++++++ .../migrations/0034_auto_20180215_1503.py | 18 ++++++++++++++++++ apps/course/models.py | 2 +- 3 files changed, 36 insertions(+), 1 deletion(-) create mode 100644 apps/content/migrations/0014_auto_20180215_1503.py create mode 100644 apps/course/migrations/0034_auto_20180215_1503.py diff --git a/apps/content/migrations/0014_auto_20180215_1503.py b/apps/content/migrations/0014_auto_20180215_1503.py new file mode 100644 index 00000000..8db0e4b3 --- /dev/null +++ b/apps/content/migrations/0014_auto_20180215_1503.py @@ -0,0 +1,17 @@ +# Generated by Django 2.0.2 on 2018-02-15 15:03 + +from django.db import migrations + + +class Migration(migrations.Migration): + + dependencies = [ + ('content', '0013_auto_20180212_0537'), + ] + + operations = [ + migrations.AlterModelOptions( + name='content', + options={'ordering': ('position', '-created_at'), 'verbose_name': 'Контент', 'verbose_name_plural': 'Контент'}, + ), + ] diff --git a/apps/course/migrations/0034_auto_20180215_1503.py b/apps/course/migrations/0034_auto_20180215_1503.py new file mode 100644 index 00000000..8edac9d7 --- /dev/null +++ b/apps/course/migrations/0034_auto_20180215_1503.py @@ -0,0 +1,18 @@ +# Generated by Django 2.0.2 on 2018-02-15 15:03 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('course', '0033_auto_20180214_1346'), + ] + + operations = [ + migrations.AlterField( + model_name='course', + name='slug', + field=models.SlugField(allow_unicode=True, blank=True, max_length=100, null=True, unique=True), + ), + ] diff --git a/apps/course/models.py b/apps/course/models.py index a4820a7b..690a5b5e 100644 --- a/apps/course/models.py +++ b/apps/course/models.py @@ -41,7 +41,7 @@ class Course(BaseModel, DeactivatedMixin): (DENIED, 'Denied') ) slug = models.SlugField( - allow_unicode=True, default=default_slug, + allow_unicode=True, null=True, blank=True, max_length=100, unique=True, db_index=True, ) author = models.ForeignKey(