From 15f5d3b9e8402fae0fd93b2e92cd94432aec6a38 Mon Sep 17 00:00:00 2001 From: Ivlev Denis Date: Fri, 9 Feb 2018 18:50:18 +0300 Subject: [PATCH] Remove unique from Content model --- .../migrations/0011_auto_20180209_1549.py | 18 ++++++++++++++++++ apps/content/models.py | 2 +- 2 files changed, 19 insertions(+), 1 deletion(-) create mode 100644 apps/content/migrations/0011_auto_20180209_1549.py diff --git a/apps/content/migrations/0011_auto_20180209_1549.py b/apps/content/migrations/0011_auto_20180209_1549.py new file mode 100644 index 00000000..c5ba9754 --- /dev/null +++ b/apps/content/migrations/0011_auto_20180209_1549.py @@ -0,0 +1,18 @@ +# Generated by Django 2.0.2 on 2018-02-09 15:49 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('content', '0010_remove_gallery_course'), + ] + + operations = [ + migrations.AlterField( + model_name='content', + name='position', + field=models.PositiveSmallIntegerField(default=1, verbose_name='Положение на странице'), + ), + ] diff --git a/apps/content/models.py b/apps/content/models.py index 1bd06dff..906ee3f9 100644 --- a/apps/content/models.py +++ b/apps/content/models.py @@ -31,7 +31,7 @@ class Content(PolymorphicModel): title = models.CharField('Заголовок', max_length=100, default='') position = models.PositiveSmallIntegerField( 'Положение на странице', - default=1, unique=True + default=1, ) created_at = models.DateTimeField(auto_now_add=True)