From ed6d2cdda939d2d893188a42e66dd402599a423b Mon Sep 17 00:00:00 2001 From: Iacopo Spalletti Date: Wed, 24 Feb 2016 23:29:12 +0100 Subject: [PATCH] Add support for moved ThumbnailOption --- HISTORY.rst | 1 + djangocms_blog/migrations/0001_initial.py | 5 +++-- .../migrations/0004_auto_20150108_1435.py | 5 +++-- .../migrations/0007_auto_20150719_0933.py | 5 +++-- djangocms_blog/models.py | 11 +++++++++-- djangocms_blog/south_migrations/0001_initial.py | 11 ++++++----- ...tion__del_unique_blogcategorytranslation_.py | 9 +++++---- .../south_migrations/0003_rename_plugins.py | 7 ++++--- ...dd_field_posttranslation_meta_description.py | 9 +++++---- ...__add_field_posttranslation_meta_keywords.py | 9 +++++---- ...0006_auto__add_field_post_enable_comments.py | 9 +++++---- ...auto__add_field_posttranslation_post_text.py | 9 +++++---- ...uto__add_field_posttranslation_meta_title.py | 9 +++++---- djangocms_blog/south_migrations/0009_auto.py | 9 +++++---- ...ge_full__chg_field_post_main_image__chg_f.py | 17 +++++++++-------- .../0011_chg_field_post_translation_abstract.py | 7 ++++--- .../south_migrations/0012_move_tags.py | 7 ++++--- djangocms_blog/south_migrations/0013_auto.py | 9 +++++---- ...add_blogconfig__add_blogconfigtranslation.py | 9 +++++---- .../south_migrations/0015_create_appconfig.py | 9 +++++---- ...d_field_blogconfigtranslation_object_name.py | 7 ++++--- 21 files changed, 100 insertions(+), 73 deletions(-) diff --git a/HISTORY.rst b/HISTORY.rst index a06c863..9185927 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -13,6 +13,7 @@ History * Fix issues in migrations. Thanks @skirsdeda * Fix selecting current menu item according to menu layout * Fix some issues with haystack indexes +* Add support for moved ThumbnailOption 0.6.3 (2015-12-22) ++++++++++++++++++ diff --git a/djangocms_blog/migrations/0001_initial.py b/djangocms_blog/migrations/0001_initial.py index e581f14..24e53a0 100644 --- a/djangocms_blog/migrations/0001_initial.py +++ b/djangocms_blog/migrations/0001_initial.py @@ -9,6 +9,7 @@ import meta_mixin.models import taggit_autosuggest.managers from django.conf import settings from django.db import migrations, models +from djangocms_blog.models import thumbnail_model from filer.settings import FILER_IMAGE_MODEL ACTUAL_FILER_IMAGE_MODEL = FILER_IMAGE_MODEL or 'filer.Image' @@ -95,8 +96,8 @@ class Migration(migrations.Migration): ('categories', models.ManyToManyField(related_name='blog_posts', verbose_name='category', to='djangocms_blog.BlogCategory')), ('content', cms.models.fields.PlaceholderField(slotname='post_content', editable=False, to='cms.Placeholder', null=True)), ('main_image', filer.fields.image.FilerImageField(related_name='djangocms_blog_post_image', verbose_name='Main image', blank=True, to=ACTUAL_FILER_IMAGE_MODEL, null=True)), - ('main_image_full', models.ForeignKey(related_name='djangocms_blog_post_full', verbose_name='Main image full', blank=True, to='cmsplugin_filer_image.ThumbnailOption', null=True)), - ('main_image_thumbnail', models.ForeignKey(related_name='djangocms_blog_post_thumbnail', verbose_name='Main image thumbnail', blank=True, to='cmsplugin_filer_image.ThumbnailOption', null=True)), + ('main_image_full', models.ForeignKey(related_name='djangocms_blog_post_full', verbose_name='Main image full', blank=True, to=thumbnail_model, null=True)), + ('main_image_thumbnail', models.ForeignKey(related_name='djangocms_blog_post_thumbnail', verbose_name='Main image thumbnail', blank=True, to=thumbnail_model, null=True)), ('tags', taggit_autosuggest.managers.TaggableManager(to='taggit.Tag', through='taggit.TaggedItem', blank=True, help_text='A comma-separated list of tags.', verbose_name='Tags')), ], options={ diff --git a/djangocms_blog/migrations/0004_auto_20150108_1435.py b/djangocms_blog/migrations/0004_auto_20150108_1435.py index 79e727f..b316abd 100644 --- a/djangocms_blog/migrations/0004_auto_20150108_1435.py +++ b/djangocms_blog/migrations/0004_auto_20150108_1435.py @@ -4,6 +4,7 @@ from __future__ import unicode_literals import django.db.models.deletion import filer.fields.image from django.db import migrations, models +from djangocms_blog.models import thumbnail_model from filer.settings import FILER_IMAGE_MODEL ACTUAL_FILER_IMAGE_MODEL = FILER_IMAGE_MODEL or 'filer.Image' @@ -26,13 +27,13 @@ class Migration(migrations.Migration): migrations.AlterField( model_name='post', name='main_image_full', - field=models.ForeignKey(related_name='djangocms_blog_post_full', on_delete=django.db.models.deletion.SET_NULL, verbose_name='Main image full', blank=True, to='cmsplugin_filer_image.ThumbnailOption', null=True), + field=models.ForeignKey(related_name='djangocms_blog_post_full', on_delete=django.db.models.deletion.SET_NULL, verbose_name='Main image full', blank=True, to=thumbnail_model, null=True), preserve_default=True, ), migrations.AlterField( model_name='post', name='main_image_thumbnail', - field=models.ForeignKey(related_name='djangocms_blog_post_thumbnail', on_delete=django.db.models.deletion.SET_NULL, verbose_name='Main image thumbnail', blank=True, to='cmsplugin_filer_image.ThumbnailOption', null=True), + field=models.ForeignKey(related_name='djangocms_blog_post_thumbnail', on_delete=django.db.models.deletion.SET_NULL, verbose_name='Main image thumbnail', blank=True, to=thumbnail_model, null=True), preserve_default=True, ), ] diff --git a/djangocms_blog/migrations/0007_auto_20150719_0933.py b/djangocms_blog/migrations/0007_auto_20150719_0933.py index b305433..f5fa900 100644 --- a/djangocms_blog/migrations/0007_auto_20150719_0933.py +++ b/djangocms_blog/migrations/0007_auto_20150719_0933.py @@ -7,6 +7,7 @@ import djangocms_text_ckeditor.fields import filer.fields.image from django.conf import settings from django.db import migrations, models +from djangocms_blog.models import thumbnail_model from filer.settings import FILER_IMAGE_MODEL ACTUAL_FILER_IMAGE_MODEL = FILER_IMAGE_MODEL or 'filer.Image' @@ -109,13 +110,13 @@ class Migration(migrations.Migration): migrations.AlterField( model_name='post', name='main_image_full', - field=models.ForeignKey(on_delete=django.db.models.deletion.SET_NULL, blank=True, verbose_name='main image full', to='cmsplugin_filer_image.ThumbnailOption', related_name='djangocms_blog_post_full', null=True), + field=models.ForeignKey(on_delete=django.db.models.deletion.SET_NULL, blank=True, verbose_name='main image full', to=thumbnail_model, related_name='djangocms_blog_post_full', null=True), preserve_default=True, ), migrations.AlterField( model_name='post', name='main_image_thumbnail', - field=models.ForeignKey(on_delete=django.db.models.deletion.SET_NULL, blank=True, verbose_name='main image thumbnail', to='cmsplugin_filer_image.ThumbnailOption', related_name='djangocms_blog_post_thumbnail', null=True), + field=models.ForeignKey(on_delete=django.db.models.deletion.SET_NULL, blank=True, verbose_name='main image thumbnail', to=thumbnail_model, related_name='djangocms_blog_post_thumbnail', null=True), preserve_default=True, ), migrations.AlterField( diff --git a/djangocms_blog/models.py b/djangocms_blog/models.py index d38b504..8de9272 100644 --- a/djangocms_blog/models.py +++ b/djangocms_blog/models.py @@ -26,6 +26,13 @@ from .settings import get_setting BLOG_CURRENT_POST_IDENTIFIER = get_setting('CURRENT_POST_IDENTIFIER') BLOG_CURRENT_NAMESPACE = get_setting('CURRENT_NAMESPACE') +try: + from filer.models import ThumbnailOption # NOQA + thumbnail_model = 'filer.ThumbnailOption' +except ImportError: + from cmsplugin_filer_image.models import ThumbnailOption # NOQA + thumbnail_model = 'cmsplugin_filer_image.ThumbnailOption' + @python_2_unicode_compatible class BlogCategory(TranslatableModel): @@ -104,12 +111,12 @@ class Post(ModelMeta, TranslatableModel): main_image = FilerImageField(verbose_name=_('main image'), blank=True, null=True, on_delete=models.SET_NULL, related_name='djangocms_blog_post_image') - main_image_thumbnail = models.ForeignKey('cmsplugin_filer_image.ThumbnailOption', + main_image_thumbnail = models.ForeignKey(thumbnail_model, verbose_name=_('main image thumbnail'), related_name='djangocms_blog_post_thumbnail', on_delete=models.SET_NULL, blank=True, null=True) - main_image_full = models.ForeignKey('cmsplugin_filer_image.ThumbnailOption', + main_image_full = models.ForeignKey(thumbnail_model, verbose_name=_('main image full'), related_name='djangocms_blog_post_full', on_delete=models.SET_NULL, diff --git a/djangocms_blog/south_migrations/0001_initial.py b/djangocms_blog/south_migrations/0001_initial.py index b3087dc..e61d8f8 100644 --- a/djangocms_blog/south_migrations/0001_initial.py +++ b/djangocms_blog/south_migrations/0001_initial.py @@ -1,6 +1,7 @@ # -*- coding: utf-8 -*- from django.contrib.auth import get_user_model from django.utils import timezone +from djangocms_blog.models import thumbnail_model from south.db import db from south.v2 import SchemaMigration from django.db import models @@ -66,8 +67,8 @@ class Migration(SchemaMigration): ('date_published_end', self.gf('django.db.models.fields.DateTimeField')(null=True, blank=True)), ('publish', self.gf('django.db.models.fields.BooleanField')(default=False)), ('main_image', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['filer.Image'], null=True, blank=True)), - ('main_image_thumbnail', self.gf('django.db.models.fields.related.ForeignKey')(blank=True, related_name='blog_post_thumbnail', null=True, to=orm['cmsplugin_filer_image.ThumbnailOption'])), - ('main_image_full', self.gf('django.db.models.fields.related.ForeignKey')(blank=True, related_name='blog_post_full', null=True, to=orm['cmsplugin_filer_image.ThumbnailOption'])), + ('main_image_thumbnail', self.gf('django.db.models.fields.related.ForeignKey')(blank=True, related_name='blog_post_thumbnail', null=True, to=orm[thumbnail_model])), + ('main_image_full', self.gf('django.db.models.fields.related.ForeignKey')(blank=True, related_name='blog_post_full', null=True, to=orm[thumbnail_model])), ('content', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['cms.Placeholder'], null=True)), )) db.send_create_signal(u'djangocms_blog', ['Post']) @@ -218,7 +219,7 @@ class Migration(SchemaMigration): u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), 'slot': ('django.db.models.fields.CharField', [], {'max_length': '50', 'db_index': 'True'}) }, - u'cmsplugin_filer_image.thumbnailoption': { + thumbnail_model: { 'Meta': {'ordering': "('width', 'height')", 'object_name': 'ThumbnailOption'}, 'crop': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), 'height': ('django.db.models.fields.IntegerField', [], {}), @@ -273,8 +274,8 @@ class Migration(SchemaMigration): 'date_published_end': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}), u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), 'main_image': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['filer.Image']", 'null': 'True', 'blank': 'True'}), - 'main_image_full': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'blog_post_full'", 'null': 'True', 'to': u"orm['cmsplugin_filer_image.ThumbnailOption']"}), - 'main_image_thumbnail': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'blog_post_thumbnail'", 'null': 'True', 'to': u"orm['cmsplugin_filer_image.ThumbnailOption']"}), + 'main_image_full': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'blog_post_full'", 'null': 'True', 'to': u"orm['%s']" % thumbnail_model}), + 'main_image_thumbnail': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'blog_post_thumbnail'", 'null': 'True', 'to': u"orm['%s']" % thumbnail_model}), 'publish': ('django.db.models.fields.BooleanField', [], {'default': 'False'}) }, u'djangocms_blog.posttranslation': { diff --git a/djangocms_blog/south_migrations/0002_auto__del_blogcategorytranslation__del_unique_blogcategorytranslation_.py b/djangocms_blog/south_migrations/0002_auto__del_blogcategorytranslation__del_unique_blogcategorytranslation_.py index 0f6a554..f2a3583 100644 --- a/djangocms_blog/south_migrations/0002_auto__del_blogcategorytranslation__del_unique_blogcategorytranslation_.py +++ b/djangocms_blog/south_migrations/0002_auto__del_blogcategorytranslation__del_unique_blogcategorytranslation_.py @@ -1,5 +1,6 @@ # -*- coding: utf-8 -*- from django.conf import settings as dj_settings +from djangocms_blog.models import thumbnail_model from south.db import db from south.v2 import SchemaMigration @@ -12,7 +13,7 @@ class Migration(SchemaMigration): def backwards(self, orm): raise RuntimeError("Cannot reverse this migration. 'Post.author' and its values cannot be restored.") - + # The following code is provided here to aid in writing a correct migration # Changing field 'Post.author' db.alter_column(u'djangocms_blog_post', 'author_id', self.gf('django.db.models.fields.related.ForeignKey')(to=orm[dj_settings.AUTH_USER_MODEL])) @@ -68,7 +69,7 @@ class Migration(SchemaMigration): u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), 'slot': ('django.db.models.fields.CharField', [], {'max_length': '50', 'db_index': 'True'}) }, - u'cmsplugin_filer_image.thumbnailoption': { + thumbnail_model: { 'Meta': {'ordering': "('width', 'height')", 'object_name': 'ThumbnailOption'}, 'crop': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), 'height': ('django.db.models.fields.IntegerField', [], {}), @@ -123,8 +124,8 @@ class Migration(SchemaMigration): 'date_published_end': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}), u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), 'main_image': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['filer.Image']", 'null': 'True', 'blank': 'True'}), - 'main_image_full': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'blog_post_full'", 'null': 'True', 'to': u"orm['cmsplugin_filer_image.ThumbnailOption']"}), - 'main_image_thumbnail': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'blog_post_thumbnail'", 'null': 'True', 'to': u"orm['cmsplugin_filer_image.ThumbnailOption']"}), + 'main_image_full': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'blog_post_full'", 'null': 'True', 'to': u"orm['%s']" % thumbnail_model}), + 'main_image_thumbnail': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'blog_post_thumbnail'", 'null': 'True', 'to': u"orm['%s']" % thumbnail_model}), 'publish': ('django.db.models.fields.BooleanField', [], {'default': 'False'}) }, u'djangocms_blog.post_translation': { diff --git a/djangocms_blog/south_migrations/0003_rename_plugins.py b/djangocms_blog/south_migrations/0003_rename_plugins.py index 2c62b0d..27adfcd 100644 --- a/djangocms_blog/south_migrations/0003_rename_plugins.py +++ b/djangocms_blog/south_migrations/0003_rename_plugins.py @@ -1,5 +1,6 @@ # -*- coding: utf-8 -*- from django.conf import settings as dj_settings +from djangocms_blog.models import thumbnail_model from south.db import db from south.v2 import SchemaMigration @@ -67,7 +68,7 @@ class Migration(SchemaMigration): u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), 'slot': ('django.db.models.fields.CharField', [], {'max_length': '50', 'db_index': 'True'}) }, - u'cmsplugin_filer_image.thumbnailoption': { + thumbnail_model: { 'Meta': {'ordering': "('width', 'height')", 'object_name': 'ThumbnailOption'}, 'crop': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), 'height': ('django.db.models.fields.IntegerField', [], {}), @@ -122,8 +123,8 @@ class Migration(SchemaMigration): 'date_published_end': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}), u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), 'main_image': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['filer.Image']", 'null': 'True', 'blank': 'True'}), - 'main_image_full': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'blog_post_full'", 'null': 'True', 'to': u"orm['cmsplugin_filer_image.ThumbnailOption']"}), - 'main_image_thumbnail': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'blog_post_thumbnail'", 'null': 'True', 'to': u"orm['cmsplugin_filer_image.ThumbnailOption']"}), + 'main_image_full': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'blog_post_full'", 'null': 'True', 'to': u"orm['%s']" % thumbnail_model}), + 'main_image_thumbnail': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'blog_post_thumbnail'", 'null': 'True', 'to': u"orm['%s']" % thumbnail_model}), 'publish': ('django.db.models.fields.BooleanField', [], {'default': 'False'}) }, u'djangocms_blog.posttranslation': { diff --git a/djangocms_blog/south_migrations/0004_auto__add_field_posttranslation_meta_description.py b/djangocms_blog/south_migrations/0004_auto__add_field_posttranslation_meta_description.py index 81518b1..678676d 100644 --- a/djangocms_blog/south_migrations/0004_auto__add_field_posttranslation_meta_description.py +++ b/djangocms_blog/south_migrations/0004_auto__add_field_posttranslation_meta_description.py @@ -1,5 +1,6 @@ # -*- coding: utf-8 -*- from django.conf import settings as dj_settings +from djangocms_blog.models import thumbnail_model from south.db import db from south.v2 import SchemaMigration @@ -69,7 +70,7 @@ class Migration(SchemaMigration): u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), 'slot': ('django.db.models.fields.CharField', [], {'max_length': '50', 'db_index': 'True'}) }, - u'cmsplugin_filer_image.thumbnailoption': { + thumbnail_model: { 'Meta': {'ordering': "('width', 'height')", 'object_name': 'ThumbnailOption'}, 'crop': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), 'height': ('django.db.models.fields.IntegerField', [], {}), @@ -124,8 +125,8 @@ class Migration(SchemaMigration): 'date_published_end': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}), u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), 'main_image': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['filer.Image']", 'null': 'True', 'blank': 'True'}), - 'main_image_full': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'blog_post_full'", 'null': 'True', 'to': u"orm['cmsplugin_filer_image.ThumbnailOption']"}), - 'main_image_thumbnail': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'blog_post_thumbnail'", 'null': 'True', 'to': u"orm['cmsplugin_filer_image.ThumbnailOption']"}), + 'main_image_full': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'blog_post_full'", 'null': 'True', 'to': u"orm['%s']" % thumbnail_model}), + 'main_image_thumbnail': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'blog_post_thumbnail'", 'null': 'True', 'to': u"orm['%s']" % thumbnail_model}), 'publish': ('django.db.models.fields.BooleanField', [], {'default': 'False'}) }, u'djangocms_blog.posttranslation': { @@ -197,4 +198,4 @@ class Migration(SchemaMigration): } } - complete_apps = ['djangocms_blog'] \ No newline at end of file + complete_apps = ['djangocms_blog'] diff --git a/djangocms_blog/south_migrations/0005_auto__add_field_posttranslation_meta_keywords.py b/djangocms_blog/south_migrations/0005_auto__add_field_posttranslation_meta_keywords.py index 5af45bf..e0162a4 100644 --- a/djangocms_blog/south_migrations/0005_auto__add_field_posttranslation_meta_keywords.py +++ b/djangocms_blog/south_migrations/0005_auto__add_field_posttranslation_meta_keywords.py @@ -1,5 +1,6 @@ # -*- coding: utf-8 -*- from django.conf import settings as dj_settings +from djangocms_blog.models import thumbnail_model from south.db import db from south.v2 import SchemaMigration @@ -69,7 +70,7 @@ class Migration(SchemaMigration): u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), 'slot': ('django.db.models.fields.CharField', [], {'max_length': '50', 'db_index': 'True'}) }, - u'cmsplugin_filer_image.thumbnailoption': { + thumbnail_model: { 'Meta': {'ordering': "('width', 'height')", 'object_name': 'ThumbnailOption'}, 'crop': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), 'height': ('django.db.models.fields.IntegerField', [], {}), @@ -124,8 +125,8 @@ class Migration(SchemaMigration): 'date_published_end': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}), u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), 'main_image': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['filer.Image']", 'null': 'True', 'blank': 'True'}), - 'main_image_full': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'blog_post_full'", 'null': 'True', 'to': u"orm['cmsplugin_filer_image.ThumbnailOption']"}), - 'main_image_thumbnail': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'blog_post_thumbnail'", 'null': 'True', 'to': u"orm['cmsplugin_filer_image.ThumbnailOption']"}), + 'main_image_full': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'blog_post_full'", 'null': 'True', 'to': u"orm['%s']" % thumbnail_model}), + 'main_image_thumbnail': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'blog_post_thumbnail'", 'null': 'True', 'to': u"orm['%s']" % thumbnail_model}), 'publish': ('django.db.models.fields.BooleanField', [], {'default': 'False'}) }, u'djangocms_blog.posttranslation': { @@ -198,4 +199,4 @@ class Migration(SchemaMigration): } } - complete_apps = ['djangocms_blog'] \ No newline at end of file + complete_apps = ['djangocms_blog'] diff --git a/djangocms_blog/south_migrations/0006_auto__add_field_post_enable_comments.py b/djangocms_blog/south_migrations/0006_auto__add_field_post_enable_comments.py index 228f717..f32a066 100644 --- a/djangocms_blog/south_migrations/0006_auto__add_field_post_enable_comments.py +++ b/djangocms_blog/south_migrations/0006_auto__add_field_post_enable_comments.py @@ -1,5 +1,6 @@ # -*- coding: utf-8 -*- from django.conf import settings as dj_settings +from djangocms_blog.models import thumbnail_model from south.db import db from south.v2 import SchemaMigration @@ -69,7 +70,7 @@ class Migration(SchemaMigration): u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), 'slot': ('django.db.models.fields.CharField', [], {'max_length': '50', 'db_index': 'True'}) }, - u'cmsplugin_filer_image.thumbnailoption': { + thumbnail_model: { 'Meta': {'ordering': "('width', 'height')", 'object_name': 'ThumbnailOption'}, 'crop': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), 'height': ('django.db.models.fields.IntegerField', [], {}), @@ -125,8 +126,8 @@ class Migration(SchemaMigration): 'enable_comments': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), 'main_image': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'djangocms_blog_post_image'", 'null': 'True', 'to': "orm['filer.Image']"}), - 'main_image_full': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'djangocms_blog_post_full'", 'null': 'True', 'to': u"orm['cmsplugin_filer_image.ThumbnailOption']"}), - 'main_image_thumbnail': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'djangocms_blog_post_thumbnail'", 'null': 'True', 'to': u"orm['cmsplugin_filer_image.ThumbnailOption']"}), + 'main_image_full': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'djangocms_blog_post_full'", 'null': 'True', 'to': u"orm['%s']" % thumbnail_model}), + 'main_image_thumbnail': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'djangocms_blog_post_thumbnail'", 'null': 'True', 'to': u"orm['%s']" % thumbnail_model}), 'publish': ('django.db.models.fields.BooleanField', [], {'default': 'False'}) }, u'djangocms_blog.posttranslation': { @@ -193,4 +194,4 @@ class Migration(SchemaMigration): } } - complete_apps = ['djangocms_blog'] \ No newline at end of file + complete_apps = ['djangocms_blog'] diff --git a/djangocms_blog/south_migrations/0007_auto__add_field_posttranslation_post_text.py b/djangocms_blog/south_migrations/0007_auto__add_field_posttranslation_post_text.py index f1da468..13c9238 100644 --- a/djangocms_blog/south_migrations/0007_auto__add_field_posttranslation_post_text.py +++ b/djangocms_blog/south_migrations/0007_auto__add_field_posttranslation_post_text.py @@ -1,5 +1,6 @@ # -*- coding: utf-8 -*- from django.conf import settings as dj_settings +from djangocms_blog.models import thumbnail_model from south.db import db from south.v2 import SchemaMigration @@ -69,7 +70,7 @@ class Migration(SchemaMigration): u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), 'slot': ('django.db.models.fields.CharField', [], {'max_length': '50', 'db_index': 'True'}) }, - u'cmsplugin_filer_image.thumbnailoption': { + thumbnail_model: { 'Meta': {'ordering': "('width', 'height')", 'object_name': 'ThumbnailOption'}, 'crop': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), 'height': ('django.db.models.fields.IntegerField', [], {}), @@ -125,8 +126,8 @@ class Migration(SchemaMigration): 'enable_comments': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), 'main_image': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'djangocms_blog_post_image'", 'null': 'True', 'to': "orm['filer.Image']"}), - 'main_image_full': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'djangocms_blog_post_full'", 'null': 'True', 'to': u"orm['cmsplugin_filer_image.ThumbnailOption']"}), - 'main_image_thumbnail': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'djangocms_blog_post_thumbnail'", 'null': 'True', 'to': u"orm['cmsplugin_filer_image.ThumbnailOption']"}), + 'main_image_full': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'djangocms_blog_post_full'", 'null': 'True', 'to': u"orm['%s']" % thumbnail_model}), + 'main_image_thumbnail': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'djangocms_blog_post_thumbnail'", 'null': 'True', 'to': u"orm['%s']" % thumbnail_model}), 'publish': ('django.db.models.fields.BooleanField', [], {'default': 'False'}) }, u'djangocms_blog.posttranslation': { @@ -194,4 +195,4 @@ class Migration(SchemaMigration): } } - complete_apps = ['djangocms_blog'] \ No newline at end of file + complete_apps = ['djangocms_blog'] diff --git a/djangocms_blog/south_migrations/0008_auto__add_field_posttranslation_meta_title.py b/djangocms_blog/south_migrations/0008_auto__add_field_posttranslation_meta_title.py index e05f7c8..fa79231 100644 --- a/djangocms_blog/south_migrations/0008_auto__add_field_posttranslation_meta_title.py +++ b/djangocms_blog/south_migrations/0008_auto__add_field_posttranslation_meta_title.py @@ -1,4 +1,5 @@ # -*- coding: utf-8 -*- +from djangocms_blog.models import thumbnail_model from south.utils import datetime_utils as datetime from south.db import db from south.v2 import SchemaMigration @@ -70,7 +71,7 @@ class Migration(SchemaMigration): u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), 'slot': ('django.db.models.fields.CharField', [], {'max_length': '50', 'db_index': 'True'}) }, - u'cmsplugin_filer_image.thumbnailoption': { + thumbnail_model: { 'Meta': {'ordering': "(u'width', u'height')", 'object_name': 'ThumbnailOption'}, 'crop': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), 'height': ('django.db.models.fields.IntegerField', [], {}), @@ -126,8 +127,8 @@ class Migration(SchemaMigration): 'enable_comments': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), 'main_image': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'djangocms_blog_post_image'", 'null': 'True', 'to': "orm['filer.Image']"}), - 'main_image_full': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'djangocms_blog_post_full'", 'null': 'True', 'to': u"orm['cmsplugin_filer_image.ThumbnailOption']"}), - 'main_image_thumbnail': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'djangocms_blog_post_thumbnail'", 'null': 'True', 'to': u"orm['cmsplugin_filer_image.ThumbnailOption']"}), + 'main_image_full': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'djangocms_blog_post_full'", 'null': 'True', 'to': u"orm['%s']" % thumbnail_model}), + 'main_image_thumbnail': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'djangocms_blog_post_thumbnail'", 'null': 'True', 'to': u"orm['%s']" % thumbnail_model}), 'publish': ('django.db.models.fields.BooleanField', [], {'default': 'False'}) }, u'djangocms_blog.posttranslation': { @@ -196,4 +197,4 @@ class Migration(SchemaMigration): } } - complete_apps = ['djangocms_blog'] \ No newline at end of file + complete_apps = ['djangocms_blog'] diff --git a/djangocms_blog/south_migrations/0009_auto.py b/djangocms_blog/south_migrations/0009_auto.py index 73e6fa1..234f63f 100644 --- a/djangocms_blog/south_migrations/0009_auto.py +++ b/djangocms_blog/south_migrations/0009_auto.py @@ -1,4 +1,5 @@ # -*- coding: utf-8 -*- +from djangocms_blog.models import thumbnail_model from south.utils import datetime_utils as datetime from south.db import db from south.v2 import SchemaMigration @@ -74,7 +75,7 @@ class Migration(SchemaMigration): u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), 'slot': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}) }, - u'cmsplugin_filer_image.thumbnailoption': { + thumbnail_model: { 'Meta': {'ordering': "('width', 'height')", 'object_name': 'ThumbnailOption'}, 'crop': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), 'height': ('django.db.models.fields.IntegerField', [], {}), @@ -130,8 +131,8 @@ class Migration(SchemaMigration): 'enable_comments': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), 'main_image': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'djangocms_blog_post_image'", 'null': 'True', 'to': "orm['filer.Image']"}), - 'main_image_full': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'djangocms_blog_post_full'", 'null': 'True', 'to': u"orm['cmsplugin_filer_image.ThumbnailOption']"}), - 'main_image_thumbnail': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'djangocms_blog_post_thumbnail'", 'null': 'True', 'to': u"orm['cmsplugin_filer_image.ThumbnailOption']"}), + 'main_image_full': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'djangocms_blog_post_full'", 'null': 'True', 'to': u"orm['%s']" % thumbnail_model}), + 'main_image_thumbnail': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'djangocms_blog_post_thumbnail'", 'null': 'True', 'to': u"orm['%s']" % thumbnail_model}), 'publish': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), 'sites': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'to': u"orm['sites.Site']", 'null': 'True', 'blank': 'True'}) }, @@ -206,4 +207,4 @@ class Migration(SchemaMigration): } } - complete_apps = ['djangocms_blog'] \ No newline at end of file + complete_apps = ['djangocms_blog'] diff --git a/djangocms_blog/south_migrations/0010_auto__chg_field_post_main_image_full__chg_field_post_main_image__chg_f.py b/djangocms_blog/south_migrations/0010_auto__chg_field_post_main_image_full__chg_field_post_main_image__chg_f.py index d3e8266..1def8b8 100644 --- a/djangocms_blog/south_migrations/0010_auto__chg_field_post_main_image_full__chg_field_post_main_image__chg_f.py +++ b/djangocms_blog/south_migrations/0010_auto__chg_field_post_main_image_full__chg_field_post_main_image__chg_f.py @@ -1,4 +1,5 @@ # -*- coding: utf-8 -*- +from djangocms_blog.models import thumbnail_model from south.utils import datetime_utils as datetime from south.db import db from south.v2 import SchemaMigration @@ -10,24 +11,24 @@ class Migration(SchemaMigration): def forwards(self, orm): # Changing field 'Post.main_image_full' - db.alter_column(u'djangocms_blog_post', 'main_image_full_id', self.gf('django.db.models.fields.related.ForeignKey')(null=True, on_delete=models.SET_NULL, to=orm['cmsplugin_filer_image.ThumbnailOption'])) + db.alter_column(u'djangocms_blog_post', 'main_image_full_id', self.gf('django.db.models.fields.related.ForeignKey')(null=True, on_delete=models.SET_NULL, to=orm[thumbnail_model])) # Changing field 'Post.main_image' db.alter_column(u'djangocms_blog_post', 'main_image_id', self.gf('django.db.models.fields.related.ForeignKey')(null=True, on_delete=models.SET_NULL, to=orm['filer.Image'])) # Changing field 'Post.main_image_thumbnail' - db.alter_column(u'djangocms_blog_post', 'main_image_thumbnail_id', self.gf('django.db.models.fields.related.ForeignKey')(null=True, on_delete=models.SET_NULL, to=orm['cmsplugin_filer_image.ThumbnailOption'])) + db.alter_column(u'djangocms_blog_post', 'main_image_thumbnail_id', self.gf('django.db.models.fields.related.ForeignKey')(null=True, on_delete=models.SET_NULL, to=orm[thumbnail_model])) def backwards(self, orm): # Changing field 'Post.main_image_full' - db.alter_column(u'djangocms_blog_post', 'main_image_full_id', self.gf('django.db.models.fields.related.ForeignKey')(null=True, to=orm['cmsplugin_filer_image.ThumbnailOption'])) + db.alter_column(u'djangocms_blog_post', 'main_image_full_id', self.gf('django.db.models.fields.related.ForeignKey')(null=True, to=orm[thumbnail_model])) # Changing field 'Post.main_image' db.alter_column(u'djangocms_blog_post', 'main_image_id', self.gf('django.db.models.fields.related.ForeignKey')(null=True, to=orm['filer.Image'])) # Changing field 'Post.main_image_thumbnail' - db.alter_column(u'djangocms_blog_post', 'main_image_thumbnail_id', self.gf('django.db.models.fields.related.ForeignKey')(null=True, to=orm['cmsplugin_filer_image.ThumbnailOption'])) + db.alter_column(u'djangocms_blog_post', 'main_image_thumbnail_id', self.gf('django.db.models.fields.related.ForeignKey')(null=True, to=orm[thumbnail_model])) models = { u'auth.group': { @@ -80,7 +81,7 @@ class Migration(SchemaMigration): u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), 'slot': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}) }, - u'cmsplugin_filer_image.thumbnailoption': { + thumbnail_model: { 'Meta': {'ordering': "(u'width', u'height')", 'object_name': 'ThumbnailOption'}, 'crop': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), 'height': ('django.db.models.fields.IntegerField', [], {}), @@ -136,8 +137,8 @@ class Migration(SchemaMigration): 'enable_comments': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), 'main_image': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'djangocms_blog_post_image'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': "orm['filer.Image']"}), - 'main_image_full': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'djangocms_blog_post_full'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': u"orm['cmsplugin_filer_image.ThumbnailOption']"}), - 'main_image_thumbnail': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'djangocms_blog_post_thumbnail'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': u"orm['cmsplugin_filer_image.ThumbnailOption']"}), + 'main_image_full': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'djangocms_blog_post_full'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': u"orm['%s']" % thumbnail_model}), + 'main_image_thumbnail': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'djangocms_blog_post_thumbnail'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': u"orm['%s']" % thumbnail_model}), 'publish': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), 'sites': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'to': u"orm['sites.Site']", 'null': 'True', 'blank': 'True'}) }, @@ -212,4 +213,4 @@ class Migration(SchemaMigration): } } - complete_apps = ['djangocms_blog'] \ No newline at end of file + complete_apps = ['djangocms_blog'] diff --git a/djangocms_blog/south_migrations/0011_chg_field_post_translation_abstract.py b/djangocms_blog/south_migrations/0011_chg_field_post_translation_abstract.py index d71f869..c828bbd 100644 --- a/djangocms_blog/south_migrations/0011_chg_field_post_translation_abstract.py +++ b/djangocms_blog/south_migrations/0011_chg_field_post_translation_abstract.py @@ -1,4 +1,5 @@ # -*- coding: utf-8 -*- +from djangocms_blog.models import thumbnail_model from south.db import db from south.v2 import SchemaMigration @@ -61,7 +62,7 @@ class Migration(SchemaMigration): 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), 'slot': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '255'}) }, - 'cmsplugin_filer_image.thumbnailoption': { + thumbnail_model: { 'Meta': {'object_name': 'ThumbnailOption', 'ordering': "('width', 'height')"}, 'crop': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), 'height': ('django.db.models.fields.IntegerField', [], {}), @@ -117,8 +118,8 @@ class Migration(SchemaMigration): 'enable_comments': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), 'main_image': ('django.db.models.fields.related.ForeignKey', [], {'on_delete': 'models.SET_NULL', 'blank': 'True', 'to': "orm['filer.Image']", 'null': 'True', 'related_name': "'djangocms_blog_post_image'"}), - 'main_image_full': ('django.db.models.fields.related.ForeignKey', [], {'on_delete': 'models.SET_NULL', 'blank': 'True', 'to': "orm['cmsplugin_filer_image.ThumbnailOption']", 'null': 'True', 'related_name': "'djangocms_blog_post_full'"}), - 'main_image_thumbnail': ('django.db.models.fields.related.ForeignKey', [], {'on_delete': 'models.SET_NULL', 'blank': 'True', 'to': "orm['cmsplugin_filer_image.ThumbnailOption']", 'null': 'True', 'related_name': "'djangocms_blog_post_thumbnail'"}), + 'main_image_full': ('django.db.models.fields.related.ForeignKey', [], {'on_delete': 'models.SET_NULL', 'blank': 'True', 'to': "orm[thumbnail_model]", 'null': 'True', 'related_name': "'djangocms_blog_post_full'"}), + 'main_image_thumbnail': ('django.db.models.fields.related.ForeignKey', [], {'on_delete': 'models.SET_NULL', 'blank': 'True', 'to': "orm[thumbnail_model]", 'null': 'True', 'related_name': "'djangocms_blog_post_thumbnail'"}), 'publish': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), 'sites': ('django.db.models.fields.related.ManyToManyField', [], {'blank': 'True', 'to': "orm['sites.Site']", 'null': 'True', 'symmetrical': 'False'}) }, diff --git a/djangocms_blog/south_migrations/0012_move_tags.py b/djangocms_blog/south_migrations/0012_move_tags.py index bcf9def..b63a9d4 100644 --- a/djangocms_blog/south_migrations/0012_move_tags.py +++ b/djangocms_blog/south_migrations/0012_move_tags.py @@ -1,4 +1,5 @@ # -*- coding: utf-8 -*- +from djangocms_blog.models import thumbnail_model from django.contrib.contenttypes.models import ContentType from south.utils import datetime_utils as datetime from south.db import db @@ -90,7 +91,7 @@ class Migration(DataMigration): u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), 'slot': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}) }, - u'cmsplugin_filer_image.thumbnailoption': { + thumbnail_model: { 'Meta': {'ordering': "(u'width', u'height')", 'object_name': 'ThumbnailOption'}, 'crop': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), 'height': ('django.db.models.fields.IntegerField', [], {}), @@ -146,8 +147,8 @@ class Migration(DataMigration): 'enable_comments': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), 'main_image': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'djangocms_blog_post_image'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': "orm['filer.Image']"}), - 'main_image_full': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'djangocms_blog_post_full'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': u"orm['cmsplugin_filer_image.ThumbnailOption']"}), - 'main_image_thumbnail': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'djangocms_blog_post_thumbnail'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': u"orm['cmsplugin_filer_image.ThumbnailOption']"}), + 'main_image_full': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'djangocms_blog_post_full'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': u"orm['%s']" % thumbnail_model}), + 'main_image_thumbnail': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'djangocms_blog_post_thumbnail'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': u"orm['%s']" % thumbnail_model}), 'publish': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), 'sites': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'to': u"orm['sites.Site']", 'null': 'True', 'blank': 'True'}) }, diff --git a/djangocms_blog/south_migrations/0013_auto.py b/djangocms_blog/south_migrations/0013_auto.py index c1c4d16..865679b 100644 --- a/djangocms_blog/south_migrations/0013_auto.py +++ b/djangocms_blog/south_migrations/0013_auto.py @@ -1,4 +1,5 @@ # -*- coding: utf-8 -*- +from djangocms_blog.models import thumbnail_model from south.utils import datetime_utils as datetime from south.db import db from south.v2 import SchemaMigration @@ -73,7 +74,7 @@ class Migration(SchemaMigration): u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), 'slot': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}) }, - u'cmsplugin_filer_image.thumbnailoption': { + thumbnail_model: { 'Meta': {'ordering': "(u'width', u'height')", 'object_name': 'ThumbnailOption'}, 'crop': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), 'height': ('django.db.models.fields.IntegerField', [], {}), @@ -128,8 +129,8 @@ class Migration(SchemaMigration): 'enable_comments': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), 'main_image': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'djangocms_blog_post_image'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': "orm['filer.Image']"}), - 'main_image_full': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'djangocms_blog_post_full'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': u"orm['cmsplugin_filer_image.ThumbnailOption']"}), - 'main_image_thumbnail': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'djangocms_blog_post_thumbnail'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': u"orm['cmsplugin_filer_image.ThumbnailOption']"}), + 'main_image_full': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'djangocms_blog_post_full'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': u"orm['%s']" % thumbnail_model}), + 'main_image_thumbnail': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'djangocms_blog_post_thumbnail'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': u"orm['%s']" % thumbnail_model}), 'publish': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), 'sites': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'to': u"orm['sites.Site']", 'null': 'True', 'blank': 'True'}) }, @@ -198,4 +199,4 @@ class Migration(SchemaMigration): } } - complete_apps = ['djangocms_blog'] \ No newline at end of file + complete_apps = ['djangocms_blog'] diff --git a/djangocms_blog/south_migrations/0014_auto__add_genericblogplugin__add_blogconfig__add_blogconfigtranslation.py b/djangocms_blog/south_migrations/0014_auto__add_genericblogplugin__add_blogconfig__add_blogconfigtranslation.py index ecd1300..9ce9ec3 100644 --- a/djangocms_blog/south_migrations/0014_auto__add_genericblogplugin__add_blogconfig__add_blogconfigtranslation.py +++ b/djangocms_blog/south_migrations/0014_auto__add_genericblogplugin__add_blogconfig__add_blogconfigtranslation.py @@ -1,4 +1,5 @@ # -*- coding: utf-8 -*- +from djangocms_blog.models import thumbnail_model from south.utils import datetime_utils as datetime from south.db import db from south.v2 import SchemaMigration @@ -133,7 +134,7 @@ class Migration(SchemaMigration): u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), 'slot': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}) }, - u'cmsplugin_filer_image.thumbnailoption': { + thumbnail_model: { 'Meta': {'ordering': "(u'width', u'height')", 'object_name': 'ThumbnailOption'}, 'crop': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), 'height': ('django.db.models.fields.IntegerField', [], {}), @@ -211,8 +212,8 @@ class Migration(SchemaMigration): 'enable_comments': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), 'main_image': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "u'djangocms_blog_post_image'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': "orm['filer.Image']"}), - 'main_image_full': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "u'djangocms_blog_post_full'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': u"orm['cmsplugin_filer_image.ThumbnailOption']"}), - 'main_image_thumbnail': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "u'djangocms_blog_post_thumbnail'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': u"orm['cmsplugin_filer_image.ThumbnailOption']"}), + 'main_image_full': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "u'djangocms_blog_post_full'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': u"orm['%s']" % thumbnail_model}), + 'main_image_thumbnail': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "u'djangocms_blog_post_thumbnail'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': u"orm['%s']" % thumbnail_model}), 'publish': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), 'sites': ('django.db.models.fields.related.ManyToManyField', [], {'to': u"orm['sites.Site']", 'symmetrical': 'False', 'blank': 'True'}) }, @@ -282,4 +283,4 @@ class Migration(SchemaMigration): } } - complete_apps = ['djangocms_blog'] \ No newline at end of file + complete_apps = ['djangocms_blog'] diff --git a/djangocms_blog/south_migrations/0015_create_appconfig.py b/djangocms_blog/south_migrations/0015_create_appconfig.py index 7f8e270..e38bed9 100644 --- a/djangocms_blog/south_migrations/0015_create_appconfig.py +++ b/djangocms_blog/south_migrations/0015_create_appconfig.py @@ -1,4 +1,5 @@ # -*- coding: utf-8 -*- +from djangocms_blog.models import thumbnail_model from south.utils import datetime_utils as datetime from south.db import db from south.v2 import DataMigration @@ -84,7 +85,7 @@ class Migration(DataMigration): u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), 'slot': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}) }, - u'cmsplugin_filer_image.thumbnailoption': { + thumbnail_model: { 'Meta': {'ordering': "(u'width', u'height')", 'object_name': 'ThumbnailOption'}, 'crop': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), 'height': ('django.db.models.fields.IntegerField', [], {}), @@ -162,8 +163,8 @@ class Migration(DataMigration): 'enable_comments': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), 'main_image': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "u'djangocms_blog_post_image'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': "orm['filer.Image']"}), - 'main_image_full': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "u'djangocms_blog_post_full'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': u"orm['cmsplugin_filer_image.ThumbnailOption']"}), - 'main_image_thumbnail': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "u'djangocms_blog_post_thumbnail'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': u"orm['cmsplugin_filer_image.ThumbnailOption']"}), + 'main_image_full': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "u'djangocms_blog_post_full'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': u"orm['%s']" % thumbnail_model}), + 'main_image_thumbnail': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "u'djangocms_blog_post_thumbnail'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': u"orm['%s']" % thumbnail_model}), 'publish': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), 'sites': ('django.db.models.fields.related.ManyToManyField', [], {'to': u"orm['sites.Site']", 'symmetrical': 'False', 'blank': 'True'}) }, @@ -233,4 +234,4 @@ class Migration(DataMigration): } } - complete_apps = ['djangocms_blog'] \ No newline at end of file + complete_apps = ['djangocms_blog'] diff --git a/djangocms_blog/south_migrations/0016_auto__add_field_blogconfigtranslation_object_name.py b/djangocms_blog/south_migrations/0016_auto__add_field_blogconfigtranslation_object_name.py index 22c47d9..4eed613 100644 --- a/djangocms_blog/south_migrations/0016_auto__add_field_blogconfigtranslation_object_name.py +++ b/djangocms_blog/south_migrations/0016_auto__add_field_blogconfigtranslation_object_name.py @@ -1,4 +1,5 @@ # -*- coding: utf-8 -*- +from djangocms_blog.models import thumbnail_model from south.utils import datetime_utils as datetime from south.db import db from south.v2 import SchemaMigration @@ -70,7 +71,7 @@ class Migration(SchemaMigration): 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), 'slot': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'}) }, - 'cmsplugin_filer_image.thumbnailoption': { + thumbnail_model: { 'Meta': {'object_name': 'ThumbnailOption', 'ordering': "('width', 'height')"}, 'crop': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), 'height': ('django.db.models.fields.IntegerField', [], {}), @@ -149,8 +150,8 @@ class Migration(SchemaMigration): 'enable_comments': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), 'main_image': ('django.db.models.fields.related.ForeignKey', [], {'on_delete': 'models.SET_NULL', 'null': 'True', 'to': "orm['filer.Image']", 'related_name': "'djangocms_blog_post_image'", 'blank': 'True'}), - 'main_image_full': ('django.db.models.fields.related.ForeignKey', [], {'on_delete': 'models.SET_NULL', 'null': 'True', 'to': "orm['cmsplugin_filer_image.ThumbnailOption']", 'related_name': "'djangocms_blog_post_full'", 'blank': 'True'}), - 'main_image_thumbnail': ('django.db.models.fields.related.ForeignKey', [], {'on_delete': 'models.SET_NULL', 'null': 'True', 'to': "orm['cmsplugin_filer_image.ThumbnailOption']", 'related_name': "'djangocms_blog_post_thumbnail'", 'blank': 'True'}), + 'main_image_full': ('django.db.models.fields.related.ForeignKey', [], {'on_delete': 'models.SET_NULL', 'null': 'True', 'to': "orm[thumbnail_model]", 'related_name': "'djangocms_blog_post_full'", 'blank': 'True'}), + 'main_image_thumbnail': ('django.db.models.fields.related.ForeignKey', [], {'on_delete': 'models.SET_NULL', 'null': 'True', 'to': "orm[thumbnail_model]", 'related_name': "'djangocms_blog_post_thumbnail'", 'blank': 'True'}), 'publish': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), 'sites': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'to': "orm['sites.Site']", 'blank': 'True'}) },