From d71f742efbedfb00416dbff1ae0a72eb5522e868 Mon Sep 17 00:00:00 2001 From: Dipen Patel Date: Sat, 22 Jul 2017 12:27:10 +0530 Subject: [PATCH] - Fixed migrations - fixed live blog admin field issue --- djangocms_blog/admin.py | 2 +- .../migrations/0030_auto_20170509_1831.py | 7 ++++--- .../migrations/0032_auto_20170722_1058.py | 21 ------------------- 3 files changed, 5 insertions(+), 25 deletions(-) delete mode 100644 djangocms_blog/migrations/0032_auto_20170722_1058.py diff --git a/djangocms_blog/admin.py b/djangocms_blog/admin.py index 0f7ab21..1ccc636 100755 --- a/djangocms_blog/admin.py +++ b/djangocms_blog/admin.py @@ -247,7 +247,7 @@ class PostAdmin(PlaceholderAdminMixin, FrontendEditableAdminMixin, if request.user.is_superuser: fsets[1][1]['fields'][0].append('author') if apps.is_installed('djangocms_blog.liveblog'): - fsets[1][1]['fields'][2].append('enable_liveblog') + fsets[2][1]['fields'][2].append('enable_liveblog') filter_function = get_setting('ADMIN_POST_FIELDSET_FILTER') if callable(filter_function): fsets = filter_function(fsets, request, obj=obj) diff --git a/djangocms_blog/migrations/0030_auto_20170509_1831.py b/djangocms_blog/migrations/0030_auto_20170509_1831.py index 9243743..5b879a3 100644 --- a/djangocms_blog/migrations/0030_auto_20170509_1831.py +++ b/djangocms_blog/migrations/0030_auto_20170509_1831.py @@ -1,8 +1,9 @@ # -*- coding: utf-8 -*- -# Generated by Django 1.10.5 on 2017-05-09 13:01 +# Generated by Django 1.10.5 on 2017-07-22 05:28 from __future__ import unicode_literals -from django.db import migrations, models +from django.db import migrations +import djangocms_blog.fields class Migration(migrations.Migration): @@ -15,6 +16,6 @@ class Migration(migrations.Migration): migrations.AlterField( model_name='posttranslation', name='slug', - field=models.SlugField(allow_unicode=True, blank=True, max_length=255, verbose_name='slug'), + field=djangocms_blog.fields.AutoSlugField(allow_unicode=True, blank=True, db_index=False, max_length=255, verbose_name='slug'), ), ] diff --git a/djangocms_blog/migrations/0032_auto_20170722_1058.py b/djangocms_blog/migrations/0032_auto_20170722_1058.py deleted file mode 100644 index 978a286..0000000 --- a/djangocms_blog/migrations/0032_auto_20170722_1058.py +++ /dev/null @@ -1,21 +0,0 @@ -# -*- coding: utf-8 -*- -# Generated by Django 1.10.5 on 2017-07-22 05:28 -from __future__ import unicode_literals - -from django.db import migrations -import djangocms_blog.fields - - -class Migration(migrations.Migration): - - dependencies = [ - ('djangocms_blog', '0031_auto_20170610_1744'), - ] - - operations = [ - migrations.AlterField( - model_name='posttranslation', - name='slug', - field=djangocms_blog.fields.AutoSlugField(allow_unicode=True, blank=True, db_index=False, max_length=255, verbose_name='slug'), - ), - ]