From 3488464ef10e9b926349d5c909004db34b9da17b Mon Sep 17 00:00:00 2001 From: Iacopo Spalletti Date: Sun, 29 May 2016 00:55:49 +0200 Subject: [PATCH 1/4] Better strategy for ThumbnailOption detection --- djangocms_blog/migrations/0017_thumbnail_move.py | 5 ++++- djangocms_blog/models.py | 10 ++++++---- ...uthor__chg_field_post_main_image_full__chg_field.py | 10 +++++++--- 3 files changed, 17 insertions(+), 8 deletions(-) diff --git a/djangocms_blog/migrations/0017_thumbnail_move.py b/djangocms_blog/migrations/0017_thumbnail_move.py index 1b1cb47..9aff3c7 100644 --- a/djangocms_blog/migrations/0017_thumbnail_move.py +++ b/djangocms_blog/migrations/0017_thumbnail_move.py @@ -10,7 +10,10 @@ class Migration(migrations.Migration): if 'cmsplugin_filer' not in thumbnail_model: dependencies = [ ('djangocms_blog', '0016_auto_20160502_1741'), - ('cmsplugin_filer_image', '0006_auto_20160427_1438') + ('cmsplugin_filer_image', '0003_mv_thumbnail_option_to_filer_20160119_1720'), + ] + run_before = [ + ('cmsplugin_filer_image', '0004_auto_20160120_0950'), ] else: dependencies = [ diff --git a/djangocms_blog/models.py b/djangocms_blog/models.py index 1a5874c..3a62aee 100644 --- a/djangocms_blog/models.py +++ b/djangocms_blog/models.py @@ -33,11 +33,13 @@ BLOG_CURRENT_POST_IDENTIFIER = get_setting('CURRENT_POST_IDENTIFIER') BLOG_CURRENT_NAMESPACE = get_setting('CURRENT_NAMESPACE') try: # pragma: no cover - from filer.models import ThumbnailOption # NOQA - thumbnail_model = 'filer.ThumbnailOption' -except ImportError: # pragma: no cover from cmsplugin_filer_image.models import ThumbnailOption # NOQA - thumbnail_model = 'cmsplugin_filer_image.ThumbnailOption' +except ImportError: # pragma: no cover + from filer.models import ThumbnailOption # NOQA + +thumbnail_model = '%s.%s' % ( + ThumbnailOption._meta.app_label, ThumbnailOption.__name__ +) try: diff --git a/djangocms_blog/south_migrations/0019_auto__chg_field_post_author__chg_field_post_main_image_full__chg_field.py b/djangocms_blog/south_migrations/0019_auto__chg_field_post_author__chg_field_post_main_image_full__chg_field.py index a2bea06..5ee2cb5 100644 --- a/djangocms_blog/south_migrations/0019_auto__chg_field_post_author__chg_field_post_main_image_full__chg_field.py +++ b/djangocms_blog/south_migrations/0019_auto__chg_field_post_author__chg_field_post_main_image_full__chg_field.py @@ -9,15 +9,19 @@ from djangocms_blog.models import thumbnail_model class Migration(SchemaMigration): if 'cmsplugin_filer' not in thumbnail_model: - dependencies = [ + depends_on = [ ('djangocms_blog', '0018_auto__chg_field_post_main_image_full__chg_field_post_main_image_thumbn'), - ('cmsplugin_filer_image', '0014_auto__del_thumbnailoption__chg_field_filerimage_thumbnail_option') + ('cmsplugin_filer_image', '0013_mv_thumbnailoption_to_filer'), + ] + needed_by = [ + ('cmsplugin_filer_image', '0014_auto__del_thumbnailoption__chg_field_filerimage_thumbnail_option'), ] else: - dependencies = [ + depends_on = [ ('djangocms_blog', '0018_auto__chg_field_post_main_image_full__chg_field_post_main_image_thumbn'), ] + def forwards(self, orm): # Changing field 'Post.author' From ea9970d2503a7f80f3f897a879c127e4b31b7972 Mon Sep 17 00:00:00 2001 From: Iacopo Spalletti Date: Sun, 29 May 2016 02:36:52 +0200 Subject: [PATCH 2/4] Fix migrations --- .../migrations/0004_auto_20150108_1435.py | 13 ++++- .../migrations/0007_auto_20150719_0933.py | 13 ++++- .../migrations/0017_thumbnail_move.py | 3 + .../south_migrations/0001_initial.py | 11 ++-- ...on__del_unique_blogcategorytranslation_.py | 9 ++- .../south_migrations/0003_rename_plugins.py | 13 +++-- ..._field_posttranslation_meta_description.py | 13 +++-- ...add_field_posttranslation_meta_keywords.py | 13 +++-- ...06_auto__add_field_post_enable_comments.py | 9 ++- ...to__add_field_posttranslation_post_text.py | 9 ++- ...o__add_field_posttranslation_meta_title.py | 17 ++++-- djangocms_blog/south_migrations/0009_auto.py | 17 ++++-- ..._full__chg_field_post_main_image__chg_f.py | 17 ++++-- ...011_chg_field_post_translation_abstract.py | 31 +++++----- .../south_migrations/0012_move_tags.py | 18 ++++-- djangocms_blog/south_migrations/0013_auto.py | 17 ++++-- ...d_blogconfig__add_blogconfigtranslation.py | 17 ++++-- .../south_migrations/0015_create_appconfig.py | 17 ++++-- ...field_blogconfigtranslation_object_name.py | 29 ++++++---- ..._full__chg_field_post_date_published__c.py | 25 +++++---- ..._full__chg_field_post_main_image_thumbn.py | 28 ++++++---- ...g_field_post_main_image_full__chg_field.py | 56 +++++++++++++++---- tests/test_utils/migrations/0001_initial.py | 8 +-- .../south_migrations/0001_initial.py | 2 +- 24 files changed, 275 insertions(+), 130 deletions(-) diff --git a/djangocms_blog/migrations/0004_auto_20150108_1435.py b/djangocms_blog/migrations/0004_auto_20150108_1435.py index b316abd..9b40ec1 100644 --- a/djangocms_blog/migrations/0004_auto_20150108_1435.py +++ b/djangocms_blog/migrations/0004_auto_20150108_1435.py @@ -12,10 +12,21 @@ ACTUAL_FILER_IMAGE_MODEL = FILER_IMAGE_MODEL or 'filer.Image' class Migration(migrations.Migration): + if 'cmsplugin_filer' not in thumbnail_model: + filer_dependencies = [ + ('filer', '0003_thumbnailoption'), + ('cmsplugin_filer_image', '0006_auto_20160427_1438') + ] + else: + filer_dependencies = [ + ('filer', '__first__'), + ('cmsplugin_filer_image', '__first__'), + ] + dependencies = [ migrations.swappable_dependency(ACTUAL_FILER_IMAGE_MODEL), ('djangocms_blog', '0003_auto_20141201_2252'), - ] + ] + filer_dependencies operations = [ migrations.AlterField( diff --git a/djangocms_blog/migrations/0007_auto_20150719_0933.py b/djangocms_blog/migrations/0007_auto_20150719_0933.py index f5fa900..63c0da8 100644 --- a/djangocms_blog/migrations/0007_auto_20150719_0933.py +++ b/djangocms_blog/migrations/0007_auto_20150719_0933.py @@ -15,10 +15,21 @@ ACTUAL_FILER_IMAGE_MODEL = FILER_IMAGE_MODEL or 'filer.Image' class Migration(migrations.Migration): + if 'cmsplugin_filer' not in thumbnail_model: + filer_dependencies = [ + ('filer', '0003_thumbnailoption'), + ('cmsplugin_filer_image', '0006_auto_20160427_1438') + ] + else: + filer_dependencies = [ + ('filer', '__first__'), + ('cmsplugin_filer_image', '__first__'), + ] + dependencies = [ ('djangocms_blog', '0006_auto_20150214_1907'), migrations.swappable_dependency(ACTUAL_FILER_IMAGE_MODEL), - ] + ] + filer_dependencies operations = [ migrations.AlterModelOptions( diff --git a/djangocms_blog/migrations/0017_thumbnail_move.py b/djangocms_blog/migrations/0017_thumbnail_move.py index 9aff3c7..fce5e56 100644 --- a/djangocms_blog/migrations/0017_thumbnail_move.py +++ b/djangocms_blog/migrations/0017_thumbnail_move.py @@ -10,6 +10,7 @@ class Migration(migrations.Migration): if 'cmsplugin_filer' not in thumbnail_model: dependencies = [ ('djangocms_blog', '0016_auto_20160502_1741'), + ('filer', '0003_thumbnailoption'), ('cmsplugin_filer_image', '0003_mv_thumbnail_option_to_filer_20160119_1720'), ] run_before = [ @@ -17,6 +18,8 @@ class Migration(migrations.Migration): ] else: dependencies = [ + ('filer', '__first__'), + ('cmsplugin_filer_image', '__first__'), ('djangocms_blog', '0016_auto_20160502_1741'), ] diff --git a/djangocms_blog/south_migrations/0001_initial.py b/djangocms_blog/south_migrations/0001_initial.py index e61d8f8..a99715c 100644 --- a/djangocms_blog/south_migrations/0001_initial.py +++ b/djangocms_blog/south_migrations/0001_initial.py @@ -1,11 +1,10 @@ # -*- 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 - +from django.contrib.auth import get_user_model User = get_user_model() user_orm_label = '%s.%s' % (User._meta.app_label, User._meta.object_name) @@ -14,6 +13,10 @@ user_model_label = '%s.%s' % (User._meta.app_label, User._meta.module_name) class Migration(SchemaMigration): + depends_on = [ + (User._meta.app_label, '0001_initial'), + ] + def forwards(self, orm): # Adding model 'BlogCategoryTranslation' db.create_table(u'djangocms_blog_blogcategory_translation', ( @@ -119,9 +122,9 @@ class Migration(SchemaMigration): db.create_table(m2m_table_name, ( ('id', models.AutoField(verbose_name='ID', primary_key=True, auto_created=True)), ('authorentriesplugin', models.ForeignKey(orm[u'djangocms_blog.authorentriesplugin'], null=False)), - ('user', models.ForeignKey(orm[user_orm_label], null=False)) + (User._meta.module_name, models.ForeignKey(orm[user_orm_label], null=False)) )) - db.create_unique(m2m_table_name, ['authorentriesplugin_id', 'user_id']) + db.create_unique(m2m_table_name, ['authorentriesplugin_id', '%s_id' % User._meta.module_name]) def backwards(self, orm): 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 f2a3583..534331f 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 @@ -3,6 +3,11 @@ 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 +from django.contrib.auth import get_user_model + +User = get_user_model() +user_orm_label = '%s.%s' % (User._meta.app_label, User._meta.object_name) +user_model_label = '%s.%s' % (User._meta.app_label, User._meta.module_name) class Migration(SchemaMigration): @@ -32,8 +37,8 @@ class Migration(SchemaMigration): u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) }, - u'auth.user': { - 'Meta': {'object_name': 'User'}, + user_model_label: { + 'Meta': {'object_name': User.__name__, 'db_table': "'%s'" % User._meta.db_table}, 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), diff --git a/djangocms_blog/south_migrations/0003_rename_plugins.py b/djangocms_blog/south_migrations/0003_rename_plugins.py index 27adfcd..27793df 100644 --- a/djangocms_blog/south_migrations/0003_rename_plugins.py +++ b/djangocms_blog/south_migrations/0003_rename_plugins.py @@ -3,6 +3,11 @@ 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 +from django.contrib.auth import get_user_model + +User = get_user_model() +user_orm_label = '%s.%s' % (User._meta.app_label, User._meta.object_name) +user_model_label = '%s.%s' % (User._meta.app_label, User._meta.module_name) class Migration(SchemaMigration): @@ -31,12 +36,12 @@ class Migration(SchemaMigration): u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) }, - u'auth.user': { - 'Meta': {'object_name': 'User'}, + user_model_label: { + 'Meta': {'object_name': User.__name__, 'db_table': "'%s'" % User._meta.db_table}, 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': u"orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), + 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'related_name': "u'user_set'", 'blank': 'True', 'to': u"orm['auth.Group']"}), u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), @@ -44,7 +49,7 @@ class Migration(SchemaMigration): 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': u"orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), + 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'related_name': "u'user_set'", 'blank': 'True', 'to': u"orm['auth.Permission']"}), 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) }, 'cms.cmsplugin': { 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 678676d..6c9dde7 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 @@ -3,6 +3,11 @@ 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 +from django.contrib.auth import get_user_model + +User = get_user_model() +user_orm_label = '%s.%s' % (User._meta.app_label, User._meta.object_name) +user_model_label = '%s.%s' % (User._meta.app_label, User._meta.module_name) class Migration(SchemaMigration): @@ -33,12 +38,12 @@ class Migration(SchemaMigration): u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) }, - u'auth.user': { - 'Meta': {'object_name': 'User'}, + user_model_label: { + 'Meta': {'object_name': User.__name__, 'db_table': "'%s'" % User._meta.db_table}, 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': u"orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), + 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'related_name': "u'user_set'", 'blank': 'True', 'to': u"orm['auth.Group']"}), u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), @@ -46,7 +51,7 @@ class Migration(SchemaMigration): 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': u"orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), + 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'related_name': "u'user_set'", 'blank': 'True', 'to': u"orm['auth.Permission']"}), 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) }, 'cms.cmsplugin': { 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 e0162a4..275357a 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 @@ -3,6 +3,11 @@ 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 +from django.contrib.auth import get_user_model + +User = get_user_model() +user_orm_label = '%s.%s' % (User._meta.app_label, User._meta.object_name) +user_model_label = '%s.%s' % (User._meta.app_label, User._meta.module_name) class Migration(SchemaMigration): @@ -33,12 +38,12 @@ class Migration(SchemaMigration): u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) }, - u'auth.user': { - 'Meta': {'object_name': 'User'}, + user_model_label: { + 'Meta': {'object_name': User.__name__, 'db_table': "'%s'" % User._meta.db_table}, 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': u"orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), + 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'related_name': "u'user_set'", 'blank': 'True', 'to': u"orm['auth.Group']"}), u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), @@ -46,7 +51,7 @@ class Migration(SchemaMigration): 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': u"orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), + 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'related_name': "u'user_set'", 'blank': 'True', 'to': u"orm['auth.Permission']"}), 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) }, 'cms.cmsplugin': { 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 f32a066..ca75b65 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 @@ -3,6 +3,11 @@ 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 +from django.contrib.auth import get_user_model + +User = get_user_model() +user_orm_label = '%s.%s' % (User._meta.app_label, User._meta.object_name) +user_model_label = '%s.%s' % (User._meta.app_label, User._meta.module_name) class Migration(SchemaMigration): @@ -33,8 +38,8 @@ class Migration(SchemaMigration): u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) }, - u'auth.user': { - 'Meta': {'object_name': 'User'}, + user_model_label: { + 'Meta': {'object_name': User.__name__, 'db_table': "'%s'" % User._meta.db_table}, 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), 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 13c9238..d5b5e58 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 @@ -3,6 +3,11 @@ 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 +from django.contrib.auth import get_user_model + +User = get_user_model() +user_orm_label = '%s.%s' % (User._meta.app_label, User._meta.object_name) +user_model_label = '%s.%s' % (User._meta.app_label, User._meta.module_name) class Migration(SchemaMigration): @@ -33,8 +38,8 @@ class Migration(SchemaMigration): u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) }, - u'auth.user': { - 'Meta': {'object_name': 'User'}, + user_model_label: { + 'Meta': {'object_name': User.__name__, 'db_table': "'%s'" % User._meta.db_table}, 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), 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 fa79231..4dd07e9 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 @@ -4,6 +4,11 @@ from south.utils import datetime_utils as datetime from south.db import db from south.v2 import SchemaMigration from django.db import models +from django.contrib.auth import get_user_model + +User = get_user_model() +user_orm_label = '%s.%s' % (User._meta.app_label, User._meta.object_name) +user_model_label = '%s.%s' % (User._meta.app_label, User._meta.module_name) class Migration(SchemaMigration): @@ -34,8 +39,8 @@ class Migration(SchemaMigration): u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) }, - u'auth.user': { - 'Meta': {'object_name': 'User'}, + user_model_label: { + 'Meta': {'object_name': User.__name__, 'db_table': "'%s'" % User._meta.db_table}, 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), @@ -89,7 +94,7 @@ class Migration(SchemaMigration): }, u'djangocms_blog.authorentriesplugin': { 'Meta': {'object_name': 'AuthorEntriesPlugin', '_ormbases': ['cms.CMSPlugin']}, - 'authors': ('django.db.models.fields.related.ManyToManyField', [], {'to': u"orm['auth.User']", 'symmetrical': 'False'}), + 'authors': ('django.db.models.fields.related.ManyToManyField', [], {'to': u"orm['%s']" % user_orm_label, 'symmetrical': 'False'}), u'cmsplugin_ptr': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['cms.CMSPlugin']", 'unique': 'True', 'primary_key': 'True'}), 'latest_posts': ('django.db.models.fields.IntegerField', [], {'default': '5'}) }, @@ -117,7 +122,7 @@ class Migration(SchemaMigration): }, u'djangocms_blog.post': { 'Meta': {'ordering': "('-date_published', '-date_created')", 'object_name': 'Post'}, - 'author': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'djangocms_blog_post_author'", 'null': 'True', 'to': u"orm['auth.User']"}), + 'author': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'djangocms_blog_post_author'", 'null': 'True', 'to': u"orm['%s']" % user_orm_label}), 'categories': ('django.db.models.fields.related.ManyToManyField', [], {'related_name': "'blog_posts'", 'symmetrical': 'False', 'to': u"orm['djangocms_blog.BlogCategory']"}), 'content': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['cms.Placeholder']", 'null': 'True'}), 'date_created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), @@ -156,7 +161,7 @@ class Migration(SchemaMigration): 'modified_at': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}), 'name': ('django.db.models.fields.CharField', [], {'default': "u''", 'max_length': '255', 'blank': 'True'}), 'original_filename': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}), - 'owner': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "u'owned_files'", 'null': 'True', 'to': u"orm['auth.User']"}), + 'owner': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "u'owned_files'", 'null': 'True', 'to': u"orm['%s']" % user_orm_label}), 'polymorphic_ctype': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "u'polymorphic_filer.file_set'", 'null': 'True', 'to': u"orm['contenttypes.ContentType']"}), 'sha1': ('django.db.models.fields.CharField', [], {'default': "u''", 'max_length': '40', 'blank': 'True'}), 'uploaded_at': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}) @@ -169,7 +174,7 @@ class Migration(SchemaMigration): u'lft': ('django.db.models.fields.PositiveIntegerField', [], {'db_index': 'True'}), 'modified_at': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}), 'name': ('django.db.models.fields.CharField', [], {'max_length': '255'}), - 'owner': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "u'filer_owned_folders'", 'null': 'True', 'to': u"orm['auth.User']"}), + 'owner': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "u'filer_owned_folders'", 'null': 'True', 'to': u"orm['%s']" % user_orm_label}), 'parent': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "u'children'", 'null': 'True', 'to': u"orm['filer.Folder']"}), u'rght': ('django.db.models.fields.PositiveIntegerField', [], {'db_index': 'True'}), u'tree_id': ('django.db.models.fields.PositiveIntegerField', [], {'db_index': 'True'}), diff --git a/djangocms_blog/south_migrations/0009_auto.py b/djangocms_blog/south_migrations/0009_auto.py index 234f63f..58d610f 100644 --- a/djangocms_blog/south_migrations/0009_auto.py +++ b/djangocms_blog/south_migrations/0009_auto.py @@ -4,6 +4,11 @@ from south.utils import datetime_utils as datetime from south.db import db from south.v2 import SchemaMigration from django.db import models +from django.contrib.auth import get_user_model + +User = get_user_model() +user_orm_label = '%s.%s' % (User._meta.app_label, User._meta.object_name) +user_model_label = '%s.%s' % (User._meta.app_label, User._meta.module_name) class Migration(SchemaMigration): @@ -38,8 +43,8 @@ class Migration(SchemaMigration): u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) }, - u'auth.user': { - 'Meta': {'object_name': 'User'}, + user_model_label: { + 'Meta': {'object_name': User.__name__, 'db_table': "'%s'" % User._meta.db_table}, 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), @@ -93,7 +98,7 @@ class Migration(SchemaMigration): }, u'djangocms_blog.authorentriesplugin': { 'Meta': {'object_name': 'AuthorEntriesPlugin', '_ormbases': ['cms.CMSPlugin']}, - 'authors': ('django.db.models.fields.related.ManyToManyField', [], {'to': u"orm['auth.User']", 'symmetrical': 'False'}), + 'authors': ('django.db.models.fields.related.ManyToManyField', [], {'to': u"orm['%s']" % user_orm_label, 'symmetrical': 'False'}), u'cmsplugin_ptr': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['cms.CMSPlugin']", 'unique': 'True', 'primary_key': 'True'}), 'latest_posts': ('django.db.models.fields.IntegerField', [], {'default': '5'}) }, @@ -121,7 +126,7 @@ class Migration(SchemaMigration): }, u'djangocms_blog.post': { 'Meta': {'ordering': "('-date_published', '-date_created')", 'object_name': 'Post'}, - 'author': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'djangocms_blog_post_author'", 'null': 'True', 'to': u"orm['auth.User']"}), + 'author': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'djangocms_blog_post_author'", 'null': 'True', 'to': u"orm['%s']" % user_orm_label}), 'categories': ('django.db.models.fields.related.ManyToManyField', [], {'related_name': "'blog_posts'", 'symmetrical': 'False', 'to': u"orm['djangocms_blog.BlogCategory']"}), 'content': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['cms.Placeholder']", 'null': 'True'}), 'date_created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), @@ -161,7 +166,7 @@ class Migration(SchemaMigration): 'modified_at': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}), 'name': ('django.db.models.fields.CharField', [], {'default': "u''", 'max_length': '255', 'blank': 'True'}), 'original_filename': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}), - 'owner': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "u'owned_files'", 'null': 'True', 'to': u"orm['auth.User']"}), + 'owner': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "u'owned_files'", 'null': 'True', 'to': u"orm['%s']" % user_orm_label}), 'polymorphic_ctype': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "u'polymorphic_filer.file_set'", 'null': 'True', 'to': u"orm['contenttypes.ContentType']"}), 'sha1': ('django.db.models.fields.CharField', [], {'default': "u''", 'max_length': '40', 'blank': 'True'}), 'uploaded_at': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}) @@ -174,7 +179,7 @@ class Migration(SchemaMigration): u'lft': ('django.db.models.fields.PositiveIntegerField', [], {'db_index': 'True'}), 'modified_at': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}), 'name': ('django.db.models.fields.CharField', [], {'max_length': '255'}), - 'owner': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "u'filer_owned_folders'", 'null': 'True', 'to': u"orm['auth.User']"}), + 'owner': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "u'filer_owned_folders'", 'null': 'True', 'to': u"orm['%s']" % user_orm_label}), 'parent': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "u'children'", 'null': 'True', 'to': u"orm['filer.Folder']"}), u'rght': ('django.db.models.fields.PositiveIntegerField', [], {'db_index': 'True'}), u'tree_id': ('django.db.models.fields.PositiveIntegerField', [], {'db_index': 'True'}), 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 1def8b8..caa981c 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 @@ -4,6 +4,11 @@ from south.utils import datetime_utils as datetime from south.db import db from south.v2 import SchemaMigration from django.db import models +from django.contrib.auth import get_user_model + +User = get_user_model() +user_orm_label = '%s.%s' % (User._meta.app_label, User._meta.object_name) +user_model_label = '%s.%s' % (User._meta.app_label, User._meta.module_name) class Migration(SchemaMigration): @@ -44,8 +49,8 @@ class Migration(SchemaMigration): u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) }, - u'auth.user': { - 'Meta': {'object_name': 'User'}, + user_model_label: { + 'Meta': {'object_name': User.__name__, 'db_table': "'%s'" % User._meta.db_table}, 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), @@ -99,7 +104,7 @@ class Migration(SchemaMigration): }, u'djangocms_blog.authorentriesplugin': { 'Meta': {'object_name': 'AuthorEntriesPlugin'}, - 'authors': ('django.db.models.fields.related.ManyToManyField', [], {'to': u"orm['auth.User']", 'symmetrical': 'False'}), + 'authors': ('django.db.models.fields.related.ManyToManyField', [], {'to': u"orm['%s']" % user_orm_label, 'symmetrical': 'False'}), u'cmsplugin_ptr': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['cms.CMSPlugin']", 'unique': 'True', 'primary_key': 'True'}), 'latest_posts': ('django.db.models.fields.IntegerField', [], {'default': '5'}) }, @@ -127,7 +132,7 @@ class Migration(SchemaMigration): }, u'djangocms_blog.post': { 'Meta': {'ordering': "('-date_published', '-date_created')", 'object_name': 'Post'}, - 'author': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'djangocms_blog_post_author'", 'null': 'True', 'to': u"orm['auth.User']"}), + 'author': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'djangocms_blog_post_author'", 'null': 'True', 'to': u"orm['%s']" % user_orm_label}), 'categories': ('django.db.models.fields.related.ManyToManyField', [], {'related_name': "'blog_posts'", 'symmetrical': 'False', 'to': u"orm['djangocms_blog.BlogCategory']"}), 'content': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['cms.Placeholder']", 'null': 'True'}), 'date_created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), @@ -167,7 +172,7 @@ class Migration(SchemaMigration): 'modified_at': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}), 'name': ('django.db.models.fields.CharField', [], {'default': "u''", 'max_length': '255', 'blank': 'True'}), 'original_filename': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}), - 'owner': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "u'owned_files'", 'null': 'True', 'to': u"orm['auth.User']"}), + 'owner': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "u'owned_files'", 'null': 'True', 'to': u"orm['%s']" % user_orm_label}), 'polymorphic_ctype': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "u'polymorphic_filer.file_set'", 'null': 'True', 'to': u"orm['contenttypes.ContentType']"}), 'sha1': ('django.db.models.fields.CharField', [], {'default': "u''", 'max_length': '40', 'blank': 'True'}), 'uploaded_at': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}) @@ -180,7 +185,7 @@ class Migration(SchemaMigration): u'lft': ('django.db.models.fields.PositiveIntegerField', [], {'db_index': 'True'}), 'modified_at': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}), 'name': ('django.db.models.fields.CharField', [], {'max_length': '255'}), - 'owner': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "u'filer_owned_folders'", 'null': 'True', 'to': u"orm['auth.User']"}), + 'owner': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "u'filer_owned_folders'", 'null': 'True', 'to': u"orm['%s']" % user_orm_label}), 'parent': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "u'children'", 'null': 'True', 'to': u"orm['filer.Folder']"}), u'rght': ('django.db.models.fields.PositiveIntegerField', [], {'db_index': 'True'}), u'tree_id': ('django.db.models.fields.PositiveIntegerField', [], {'db_index': 'True'}), 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 c828bbd..9de415e 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 @@ -2,6 +2,11 @@ from djangocms_blog.models import thumbnail_model from south.db import db from south.v2 import SchemaMigration +from django.contrib.auth import get_user_model + +User = get_user_model() +user_orm_label = '%s.%s' % (User._meta.app_label, User._meta.object_name) +user_model_label = '%s.%s' % (User._meta.app_label, User._meta.module_name) class Migration(SchemaMigration): @@ -26,21 +31,21 @@ class Migration(SchemaMigration): 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) }, - 'auth.user': { - 'Meta': {'object_name': 'User'}, + user_model_label: { + 'Meta': {'object_name': User.__name__, 'db_table': "'%s'" % User._meta.db_table}, 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'email': ('django.db.models.fields.EmailField', [], {'blank': 'True', 'max_length': '75'}), - 'first_name': ('django.db.models.fields.CharField', [], {'blank': 'True', 'max_length': '30'}), - 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'blank': 'True', 'symmetrical': 'False', 'to': "orm['auth.Group']", 'related_name': "'user_set'"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), + 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), + 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'related_name': "u'user_set'", 'blank': 'True', 'to': u"orm['auth.Group']"}), + u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'last_name': ('django.db.models.fields.CharField', [], {'blank': 'True', 'max_length': '30'}), + 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'blank': 'True', 'symmetrical': 'False', 'to': "orm['auth.Permission']", 'related_name': "'user_set'"}), - 'username': ('django.db.models.fields.CharField', [], {'max_length': '30', 'unique': 'True'}) + 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'related_name': "u'user_set'", 'blank': 'True', 'to': u"orm['auth.Permission']"}), + 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) }, 'cms.cmsplugin': { 'Meta': {'object_name': 'CMSPlugin'}, @@ -80,7 +85,7 @@ class Migration(SchemaMigration): }, 'djangocms_blog.authorentriesplugin': { 'Meta': {'object_name': 'AuthorEntriesPlugin'}, - 'authors': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.User']", 'symmetrical': 'False'}), + 'authors': ('django.db.models.fields.related.ManyToManyField', [], {'to': u"orm['%s']" % user_orm_label, 'symmetrical': 'False'}), 'cmsplugin_ptr': ('django.db.models.fields.related.OneToOneField', [], {'primary_key': 'True', 'unique': 'True', 'to': "orm['cms.CMSPlugin']"}), 'latest_posts': ('django.db.models.fields.IntegerField', [], {'default': '5'}) }, @@ -108,7 +113,7 @@ class Migration(SchemaMigration): }, 'djangocms_blog.post': { 'Meta': {'object_name': 'Post', 'ordering': "('-date_published', '-date_created')"}, - 'author': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'to': "orm['auth.User']", 'null': 'True', 'related_name': "'djangocms_blog_post_author'"}), + 'author': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'to': u"orm['%s']" % user_orm_label, 'null': 'True', 'related_name': "'djangocms_blog_post_author'"}), 'categories': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'to': "orm['djangocms_blog.BlogCategory']", 'related_name': "'blog_posts'"}), 'content': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['cms.Placeholder']", 'null': 'True', 'related_name': "'post_content'"}), 'date_created': ('django.db.models.fields.DateTimeField', [], {'blank': 'True', 'auto_now_add': 'True'}), @@ -148,7 +153,7 @@ class Migration(SchemaMigration): 'modified_at': ('django.db.models.fields.DateTimeField', [], {'blank': 'True', 'auto_now': 'True'}), 'name': ('django.db.models.fields.CharField', [], {'blank': 'True', 'max_length': '255', 'default': "''"}), 'original_filename': ('django.db.models.fields.CharField', [], {'blank': 'True', 'null': 'True', 'max_length': '255'}), - 'owner': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'to': "orm['auth.User']", 'null': 'True', 'related_name': "'owned_files'"}), + 'owner': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'to': u"orm['%s']" % user_orm_label, 'null': 'True', 'related_name': "'owned_files'"}), 'polymorphic_ctype': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']", 'null': 'True', 'related_name': "'polymorphic_filer.file_set+'"}), 'sha1': ('django.db.models.fields.CharField', [], {'blank': 'True', 'max_length': '40', 'default': "''"}), 'uploaded_at': ('django.db.models.fields.DateTimeField', [], {'blank': 'True', 'auto_now_add': 'True'}) @@ -161,7 +166,7 @@ class Migration(SchemaMigration): 'lft': ('django.db.models.fields.PositiveIntegerField', [], {'db_index': 'True'}), 'modified_at': ('django.db.models.fields.DateTimeField', [], {'blank': 'True', 'auto_now': 'True'}), 'name': ('django.db.models.fields.CharField', [], {'max_length': '255'}), - 'owner': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'to': "orm['auth.User']", 'null': 'True', 'related_name': "'filer_owned_folders'"}), + 'owner': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'to': u"orm['%s']" % user_orm_label, 'null': 'True', 'related_name': "'filer_owned_folders'"}), 'parent': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'to': "orm['filer.Folder']", 'null': 'True', 'related_name': "'children'"}), 'rght': ('django.db.models.fields.PositiveIntegerField', [], {'db_index': 'True'}), 'tree_id': ('django.db.models.fields.PositiveIntegerField', [], {'db_index': 'True'}), diff --git a/djangocms_blog/south_migrations/0012_move_tags.py b/djangocms_blog/south_migrations/0012_move_tags.py index b63a9d4..998fc6e 100644 --- a/djangocms_blog/south_migrations/0012_move_tags.py +++ b/djangocms_blog/south_migrations/0012_move_tags.py @@ -5,6 +5,12 @@ from south.utils import datetime_utils as datetime from south.db import db from south.v2 import DataMigration from django.db import models +from django.contrib.auth import get_user_model + +User = get_user_model() +user_orm_label = '%s.%s' % (User._meta.app_label, User._meta.object_name) +user_model_label = '%s.%s' % (User._meta.app_label, User._meta.module_name) + class Migration(DataMigration): @@ -55,8 +61,8 @@ class Migration(DataMigration): u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) }, - u'auth.user': { - 'Meta': {'object_name': 'User'}, + user_model_label: { + 'Meta': {'object_name': User.__name__, 'db_table': "'%s'" % User._meta.db_table}, 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), @@ -109,7 +115,7 @@ class Migration(DataMigration): }, u'djangocms_blog.authorentriesplugin': { 'Meta': {'object_name': 'AuthorEntriesPlugin'}, - 'authors': ('django.db.models.fields.related.ManyToManyField', [], {'to': u"orm['auth.User']", 'symmetrical': 'False'}), + 'authors': ('django.db.models.fields.related.ManyToManyField', [], {'to': u"orm['%s']" % user_orm_label, 'symmetrical': 'False'}), u'cmsplugin_ptr': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['cms.CMSPlugin']", 'unique': 'True', 'primary_key': 'True'}), 'latest_posts': ('django.db.models.fields.IntegerField', [], {'default': '5'}) }, @@ -137,7 +143,7 @@ class Migration(DataMigration): }, u'djangocms_blog.post': { 'Meta': {'ordering': "('-date_published', '-date_created')", 'object_name': 'Post'}, - 'author': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'djangocms_blog_post_author'", 'null': 'True', 'to': u"orm['auth.User']"}), + 'author': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'djangocms_blog_post_author'", 'null': 'True', 'to': u"orm['%s']" % user_orm_label}), 'categories': ('django.db.models.fields.related.ManyToManyField', [], {'related_name': "'blog_posts'", 'symmetrical': 'False', 'to': u"orm['djangocms_blog.BlogCategory']"}), 'content': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'post_content'", 'null': 'True', 'to': "orm['cms.Placeholder']"}), 'date_created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), @@ -177,7 +183,7 @@ class Migration(DataMigration): 'modified_at': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}), 'name': ('django.db.models.fields.CharField', [], {'default': "u''", 'max_length': '255', 'blank': 'True'}), 'original_filename': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}), - 'owner': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "u'owned_files'", 'null': 'True', 'to': u"orm['auth.User']"}), + 'owner': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "u'owned_files'", 'null': 'True', 'to': u"orm['%s']" % user_orm_label}), 'polymorphic_ctype': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "u'polymorphic_filer.file_set+'", 'null': 'True', 'to': u"orm['contenttypes.ContentType']"}), 'sha1': ('django.db.models.fields.CharField', [], {'default': "u''", 'max_length': '40', 'blank': 'True'}), 'uploaded_at': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}) @@ -190,7 +196,7 @@ class Migration(DataMigration): u'lft': ('django.db.models.fields.PositiveIntegerField', [], {'db_index': 'True'}), 'modified_at': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}), 'name': ('django.db.models.fields.CharField', [], {'max_length': '255'}), - 'owner': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "u'filer_owned_folders'", 'null': 'True', 'to': u"orm['auth.User']"}), + 'owner': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "u'filer_owned_folders'", 'null': 'True', 'to': u"orm['%s']" % user_orm_label}), 'parent': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "u'children'", 'null': 'True', 'to': u"orm['filer.Folder']"}), u'rght': ('django.db.models.fields.PositiveIntegerField', [], {'db_index': 'True'}), u'tree_id': ('django.db.models.fields.PositiveIntegerField', [], {'db_index': 'True'}), diff --git a/djangocms_blog/south_migrations/0013_auto.py b/djangocms_blog/south_migrations/0013_auto.py index 865679b..65406a2 100644 --- a/djangocms_blog/south_migrations/0013_auto.py +++ b/djangocms_blog/south_migrations/0013_auto.py @@ -4,6 +4,11 @@ from south.utils import datetime_utils as datetime from south.db import db from south.v2 import SchemaMigration from django.db import models +from django.contrib.auth import get_user_model + +User = get_user_model() +user_orm_label = '%s.%s' % (User._meta.app_label, User._meta.object_name) +user_model_label = '%s.%s' % (User._meta.app_label, User._meta.module_name) class Migration(SchemaMigration): @@ -38,8 +43,8 @@ class Migration(SchemaMigration): u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) }, - u'auth.user': { - 'Meta': {'object_name': 'User'}, + user_model_label: { + 'Meta': {'object_name': User.__name__, 'db_table': "'%s'" % User._meta.db_table}, 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), @@ -92,7 +97,7 @@ class Migration(SchemaMigration): }, u'djangocms_blog.authorentriesplugin': { 'Meta': {'object_name': 'AuthorEntriesPlugin'}, - 'authors': ('django.db.models.fields.related.ManyToManyField', [], {'to': u"orm['auth.User']", 'symmetrical': 'False'}), + 'authors': ('django.db.models.fields.related.ManyToManyField', [], {'to': u"orm['%s']" % user_orm_label, 'symmetrical': 'False'}), u'cmsplugin_ptr': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['cms.CMSPlugin']", 'unique': 'True', 'primary_key': 'True'}), 'latest_posts': ('django.db.models.fields.IntegerField', [], {'default': '5'}) }, @@ -119,7 +124,7 @@ class Migration(SchemaMigration): }, u'djangocms_blog.post': { 'Meta': {'ordering': "('-date_published', '-date_created')", 'object_name': 'Post'}, - 'author': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'djangocms_blog_post_author'", 'null': 'True', 'to': u"orm['auth.User']"}), + 'author': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'djangocms_blog_post_author'", 'null': 'True', 'to': u"orm['%s']" % user_orm_label}), 'categories': ('django.db.models.fields.related.ManyToManyField', [], {'related_name': "'blog_posts'", 'symmetrical': 'False', 'to': u"orm['djangocms_blog.BlogCategory']"}), 'content': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'post_content'", 'null': 'True', 'to': "orm['cms.Placeholder']"}), 'date_created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), @@ -159,7 +164,7 @@ class Migration(SchemaMigration): 'modified_at': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}), 'name': ('django.db.models.fields.CharField', [], {'default': "u''", 'max_length': '255', 'blank': 'True'}), 'original_filename': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}), - 'owner': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "u'owned_files'", 'null': 'True', 'to': u"orm['auth.User']"}), + 'owner': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "u'owned_files'", 'null': 'True', 'to': u"orm['%s']" % user_orm_label}), 'polymorphic_ctype': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "u'polymorphic_filer.file_set+'", 'null': 'True', 'to': u"orm['contenttypes.ContentType']"}), 'sha1': ('django.db.models.fields.CharField', [], {'default': "u''", 'max_length': '40', 'blank': 'True'}), 'uploaded_at': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}) @@ -172,7 +177,7 @@ class Migration(SchemaMigration): u'lft': ('django.db.models.fields.PositiveIntegerField', [], {'db_index': 'True'}), 'modified_at': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}), 'name': ('django.db.models.fields.CharField', [], {'max_length': '255'}), - 'owner': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "u'filer_owned_folders'", 'null': 'True', 'to': u"orm['auth.User']"}), + 'owner': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "u'filer_owned_folders'", 'null': 'True', 'to': u"orm['%s']" % user_orm_label}), 'parent': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "u'children'", 'null': 'True', 'to': u"orm['filer.Folder']"}), u'rght': ('django.db.models.fields.PositiveIntegerField', [], {'db_index': 'True'}), u'tree_id': ('django.db.models.fields.PositiveIntegerField', [], {'db_index': 'True'}), 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 9ce9ec3..cd132b9 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 @@ -4,6 +4,11 @@ from south.utils import datetime_utils as datetime from south.db import db from south.v2 import SchemaMigration from django.db import models +from django.contrib.auth import get_user_model + +User = get_user_model() +user_orm_label = '%s.%s' % (User._meta.app_label, User._meta.object_name) +user_model_label = '%s.%s' % (User._meta.app_label, User._meta.module_name) class Migration(SchemaMigration): @@ -98,8 +103,8 @@ class Migration(SchemaMigration): u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) }, - u'auth.user': { - 'Meta': {'object_name': 'User'}, + user_model_label: { + 'Meta': {'object_name': User.__name__, 'db_table': "'%s'" % User._meta.db_table}, 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), @@ -153,7 +158,7 @@ class Migration(SchemaMigration): u'djangocms_blog.authorentriesplugin': { 'Meta': {'object_name': 'AuthorEntriesPlugin'}, 'app_config': ('aldryn_apphooks_config.fields.AppHookConfigField', [], {'to': u"orm['djangocms_blog.BlogConfig']", 'null': 'True', 'blank': 'True'}), - 'authors': ('django.db.models.fields.related.ManyToManyField', [], {'to': u"orm['auth.User']", 'symmetrical': 'False'}), + 'authors': ('django.db.models.fields.related.ManyToManyField', [], {'to': u"orm['%s']" % user_orm_label, 'symmetrical': 'False'}), u'cmsplugin_ptr': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['cms.CMSPlugin']", 'unique': 'True', 'primary_key': 'True'}), 'latest_posts': ('django.db.models.fields.IntegerField', [], {'default': '5'}) }, @@ -202,7 +207,7 @@ class Migration(SchemaMigration): u'djangocms_blog.post': { 'Meta': {'ordering': "(u'-date_published', u'-date_created')", 'object_name': 'Post'}, 'app_config': ('aldryn_apphooks_config.fields.AppHookConfigField', [], {'to': u"orm['djangocms_blog.BlogConfig']", 'null': 'True'}), - 'author': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "u'djangocms_blog_post_author'", 'null': 'True', 'to': u"orm['auth.User']"}), + 'author': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "u'djangocms_blog_post_author'", 'null': 'True', 'to': u"orm['%s']" % user_orm_label}), 'categories': ('django.db.models.fields.related.ManyToManyField', [], {'related_name': "u'blog_posts'", 'symmetrical': 'False', 'to': u"orm['djangocms_blog.BlogCategory']"}), 'content': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "u'post_content'", 'null': 'True', 'to': "orm['cms.Placeholder']"}), 'date_created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), @@ -242,7 +247,7 @@ class Migration(SchemaMigration): 'modified_at': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}), 'name': ('django.db.models.fields.CharField', [], {'default': "u''", 'max_length': '255', 'blank': 'True'}), 'original_filename': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}), - 'owner': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "u'owned_files'", 'null': 'True', 'to': u"orm['auth.User']"}), + 'owner': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "u'owned_files'", 'null': 'True', 'to': u"orm['%s']" % user_orm_label}), 'polymorphic_ctype': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "u'polymorphic_filer.file_set+'", 'null': 'True', 'to': u"orm['contenttypes.ContentType']"}), 'sha1': ('django.db.models.fields.CharField', [], {'default': "u''", 'max_length': '40', 'blank': 'True'}), 'uploaded_at': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}) @@ -255,7 +260,7 @@ class Migration(SchemaMigration): u'lft': ('django.db.models.fields.PositiveIntegerField', [], {'db_index': 'True'}), 'modified_at': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}), 'name': ('django.db.models.fields.CharField', [], {'max_length': '255'}), - 'owner': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "u'filer_owned_folders'", 'null': 'True', 'to': u"orm['auth.User']"}), + 'owner': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "u'filer_owned_folders'", 'null': 'True', 'to': u"orm['%s']" % user_orm_label}), 'parent': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "u'children'", 'null': 'True', 'to': u"orm['filer.Folder']"}), u'rght': ('django.db.models.fields.PositiveIntegerField', [], {'db_index': 'True'}), u'tree_id': ('django.db.models.fields.PositiveIntegerField', [], {'db_index': 'True'}), diff --git a/djangocms_blog/south_migrations/0015_create_appconfig.py b/djangocms_blog/south_migrations/0015_create_appconfig.py index e38bed9..9a5ee61 100644 --- a/djangocms_blog/south_migrations/0015_create_appconfig.py +++ b/djangocms_blog/south_migrations/0015_create_appconfig.py @@ -6,6 +6,11 @@ from south.v2 import DataMigration from django.db import models from cms.models import Page from cms.utils.i18n import get_language_list +from django.contrib.auth import get_user_model + +User = get_user_model() +user_orm_label = '%s.%s' % (User._meta.app_label, User._meta.object_name) +user_model_label = '%s.%s' % (User._meta.app_label, User._meta.module_name) class Migration(DataMigration): @@ -49,8 +54,8 @@ class Migration(DataMigration): u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) }, - u'auth.user': { - 'Meta': {'object_name': 'User'}, + user_model_label: { + 'Meta': {'object_name': User.__name__, 'db_table': "'%s'" % User._meta.db_table}, 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), @@ -104,7 +109,7 @@ class Migration(DataMigration): u'djangocms_blog.authorentriesplugin': { 'Meta': {'object_name': 'AuthorEntriesPlugin'}, 'app_config': ('aldryn_apphooks_config.fields.AppHookConfigField', [], {'to': u"orm['djangocms_blog.BlogConfig']", 'null': 'True', 'blank': 'True'}), - 'authors': ('django.db.models.fields.related.ManyToManyField', [], {'to': u"orm['auth.User']", 'symmetrical': 'False'}), + 'authors': ('django.db.models.fields.related.ManyToManyField', [], {'to': u"orm['%s']" % user_orm_label, 'symmetrical': 'False'}), u'cmsplugin_ptr': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['cms.CMSPlugin']", 'unique': 'True', 'primary_key': 'True'}), 'latest_posts': ('django.db.models.fields.IntegerField', [], {'default': '5'}) }, @@ -153,7 +158,7 @@ class Migration(DataMigration): u'djangocms_blog.post': { 'Meta': {'ordering': "(u'-date_published', u'-date_created')", 'object_name': 'Post'}, 'app_config': ('aldryn_apphooks_config.fields.AppHookConfigField', [], {'to': u"orm['djangocms_blog.BlogConfig']", 'null': 'True'}), - 'author': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "u'djangocms_blog_post_author'", 'null': 'True', 'to': u"orm['auth.User']"}), + 'author': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "u'djangocms_blog_post_author'", 'null': 'True', 'to': u"orm['%s']" % user_orm_label}), 'categories': ('django.db.models.fields.related.ManyToManyField', [], {'related_name': "u'blog_posts'", 'symmetrical': 'False', 'to': u"orm['djangocms_blog.BlogCategory']"}), 'content': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "u'post_content'", 'null': 'True', 'to': "orm['cms.Placeholder']"}), 'date_created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), @@ -193,7 +198,7 @@ class Migration(DataMigration): 'modified_at': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}), 'name': ('django.db.models.fields.CharField', [], {'default': "u''", 'max_length': '255', 'blank': 'True'}), 'original_filename': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}), - 'owner': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "u'owned_files'", 'null': 'True', 'to': u"orm['auth.User']"}), + 'owner': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "u'owned_files'", 'null': 'True', 'to': u"orm['%s']" % user_orm_label}), 'polymorphic_ctype': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "u'polymorphic_filer.file_set+'", 'null': 'True', 'to': u"orm['contenttypes.ContentType']"}), 'sha1': ('django.db.models.fields.CharField', [], {'default': "u''", 'max_length': '40', 'blank': 'True'}), 'uploaded_at': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}) @@ -206,7 +211,7 @@ class Migration(DataMigration): u'lft': ('django.db.models.fields.PositiveIntegerField', [], {'db_index': 'True'}), 'modified_at': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}), 'name': ('django.db.models.fields.CharField', [], {'max_length': '255'}), - 'owner': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "u'filer_owned_folders'", 'null': 'True', 'to': u"orm['auth.User']"}), + 'owner': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "u'filer_owned_folders'", 'null': 'True', 'to': u"orm['%s']" % user_orm_label}), 'parent': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "u'children'", 'null': 'True', 'to': u"orm['filer.Folder']"}), u'rght': ('django.db.models.fields.PositiveIntegerField', [], {'db_index': 'True'}), u'tree_id': ('django.db.models.fields.PositiveIntegerField', [], {'db_index': 'True'}), 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 4eed613..eeb7149 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 @@ -5,6 +5,11 @@ from south.db import db from south.v2 import SchemaMigration from django.db import models from djangocms_blog.settings import get_setting +from django.contrib.auth import get_user_model + +User = get_user_model() +user_orm_label = '%s.%s' % (User._meta.app_label, User._meta.object_name) +user_model_label = '%s.%s' % (User._meta.app_label, User._meta.module_name) class Migration(SchemaMigration): @@ -35,20 +40,20 @@ class Migration(SchemaMigration): 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) }, - 'auth.user': { - 'Meta': {'object_name': 'User'}, + user_model_label: { + 'Meta': {'object_name': User.__name__, 'db_table': "'%s'" % User._meta.db_table}, 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'email': ('django.db.models.fields.EmailField', [], {'blank': 'True', 'max_length': '75'}), - 'first_name': ('django.db.models.fields.CharField', [], {'blank': 'True', 'max_length': '30'}), - 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'to': "orm['auth.Group']", 'related_name': "'user_set'", 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), + 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), + 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'related_name': "u'user_set'", 'blank': 'True', 'to': u"orm['auth.Group']"}), + u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'last_name': ('django.db.models.fields.CharField', [], {'blank': 'True', 'max_length': '30'}), + 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'to': "orm['auth.Permission']", 'related_name': "'user_set'", 'blank': 'True'}), + 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'related_name': "u'user_set'", 'blank': 'True', 'to': u"orm['auth.Permission']"}), 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) }, 'cms.cmsplugin': { @@ -90,7 +95,7 @@ class Migration(SchemaMigration): 'djangocms_blog.authorentriesplugin': { 'Meta': {'object_name': 'AuthorEntriesPlugin'}, 'app_config': ('aldryn_apphooks_config.fields.AppHookConfigField', [], {'null': 'True', 'to': "orm['djangocms_blog.BlogConfig']", 'blank': 'True'}), - 'authors': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'to': "orm['auth.User']"}), + 'authors': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'to': u"orm['%s']" % user_orm_label}), 'cmsplugin_ptr': ('django.db.models.fields.related.OneToOneField', [], {'primary_key': 'True', 'to': "orm['cms.CMSPlugin']", 'unique': 'True'}), 'latest_posts': ('django.db.models.fields.IntegerField', [], {'default': '5'}) }, @@ -140,7 +145,7 @@ class Migration(SchemaMigration): 'djangocms_blog.post': { 'Meta': {'object_name': 'Post', 'ordering': "('-date_published', '-date_created')"}, 'app_config': ('aldryn_apphooks_config.fields.AppHookConfigField', [], {'null': 'True', 'to': "orm['djangocms_blog.BlogConfig']"}), - 'author': ('django.db.models.fields.related.ForeignKey', [], {'null': 'True', 'to': "orm['auth.User']", 'related_name': "'djangocms_blog_post_author'", 'blank': 'True'}), + 'author': ('django.db.models.fields.related.ForeignKey', [], {'null': 'True', 'to': u"orm['%s']" % user_orm_label, 'related_name': "'djangocms_blog_post_author'", 'blank': 'True'}), 'categories': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'to': "orm['djangocms_blog.BlogCategory']", 'related_name': "'blog_posts'"}), 'content': ('django.db.models.fields.related.ForeignKey', [], {'null': 'True', 'to': "orm['cms.Placeholder']", 'related_name': "'post_content'"}), 'date_created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), @@ -180,7 +185,7 @@ class Migration(SchemaMigration): 'modified_at': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}), 'name': ('django.db.models.fields.CharField', [], {'default': "''", 'blank': 'True', 'max_length': '255'}), 'original_filename': ('django.db.models.fields.CharField', [], {'null': 'True', 'blank': 'True', 'max_length': '255'}), - 'owner': ('django.db.models.fields.related.ForeignKey', [], {'null': 'True', 'to': "orm['auth.User']", 'related_name': "'owned_files'", 'blank': 'True'}), + 'owner': ('django.db.models.fields.related.ForeignKey', [], {'null': 'True', 'to': u"orm['%s']" % user_orm_label, 'related_name': "'owned_files'", 'blank': 'True'}), 'polymorphic_ctype': ('django.db.models.fields.related.ForeignKey', [], {'null': 'True', 'to': "orm['contenttypes.ContentType']", 'related_name': "'polymorphic_filer.file_set+'"}), 'sha1': ('django.db.models.fields.CharField', [], {'default': "''", 'blank': 'True', 'max_length': '40'}), 'uploaded_at': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}) @@ -193,7 +198,7 @@ class Migration(SchemaMigration): 'lft': ('django.db.models.fields.PositiveIntegerField', [], {'db_index': 'True'}), 'modified_at': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}), 'name': ('django.db.models.fields.CharField', [], {'max_length': '255'}), - 'owner': ('django.db.models.fields.related.ForeignKey', [], {'null': 'True', 'to': "orm['auth.User']", 'related_name': "'filer_owned_folders'", 'blank': 'True'}), + 'owner': ('django.db.models.fields.related.ForeignKey', [], {'null': 'True', 'to': u"orm['%s']" % user_orm_label, 'related_name': "'filer_owned_folders'", 'blank': 'True'}), 'parent': ('django.db.models.fields.related.ForeignKey', [], {'null': 'True', 'to': "orm['filer.Folder']", 'related_name': "'children'", 'blank': 'True'}), 'rght': ('django.db.models.fields.PositiveIntegerField', [], {'db_index': 'True'}), 'tree_id': ('django.db.models.fields.PositiveIntegerField', [], {'db_index': 'True'}), diff --git a/djangocms_blog/south_migrations/0017_auto__chg_field_post_main_image_full__chg_field_post_date_published__c.py b/djangocms_blog/south_migrations/0017_auto__chg_field_post_main_image_full__chg_field_post_date_published__c.py index ff9f339..9e48f21 100644 --- a/djangocms_blog/south_migrations/0017_auto__chg_field_post_main_image_full__chg_field_post_date_published__c.py +++ b/djangocms_blog/south_migrations/0017_auto__chg_field_post_main_image_full__chg_field_post_date_published__c.py @@ -4,6 +4,11 @@ from south.db import db from south.v2 import SchemaMigration from django.db import models from djangocms_blog.models import thumbnail_model +from django.contrib.auth import get_user_model + +User = get_user_model() +user_orm_label = '%s.%s' % (User._meta.app_label, User._meta.object_name) +user_model_label = '%s.%s' % (User._meta.app_label, User._meta.module_name) class Migration(SchemaMigration): @@ -49,8 +54,8 @@ class Migration(SchemaMigration): u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) }, - u'auth.user': { - 'Meta': {'object_name': 'User'}, + user_model_label: { + 'Meta': {'object_name': User.__name__, 'db_table': "'%s'" % User._meta.db_table}, 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), @@ -85,8 +90,8 @@ 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': { - 'Meta': {'ordering': "(u'width', u'height')", 'object_name': 'ThumbnailOption'}, + thumbnail_model: { + 'Meta': {'ordering': "('width', 'height')", 'object_name': 'ThumbnailOption'}, 'crop': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), 'height': ('django.db.models.fields.IntegerField', [], {}), u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), @@ -104,7 +109,7 @@ class Migration(SchemaMigration): u'djangocms_blog.authorentriesplugin': { 'Meta': {'object_name': 'AuthorEntriesPlugin'}, 'app_config': ('aldryn_apphooks_config.fields.AppHookConfigField', [], {'to': u"orm['djangocms_blog.BlogConfig']", 'null': 'True', 'blank': 'True'}), - 'authors': ('django.db.models.fields.related.ManyToManyField', [], {'to': u"orm['auth.User']", 'symmetrical': 'False'}), + 'authors': ('django.db.models.fields.related.ManyToManyField', [], {'to': u"orm['%s']" % user_orm_label, 'symmetrical': 'False'}), u'cmsplugin_ptr': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['cms.CMSPlugin']", 'unique': 'True', 'primary_key': 'True'}), 'latest_posts': ('django.db.models.fields.IntegerField', [], {'default': '5'}) }, @@ -154,7 +159,7 @@ class Migration(SchemaMigration): u'djangocms_blog.post': { 'Meta': {'ordering': "(u'-date_published', u'-date_created')", 'object_name': 'Post'}, 'app_config': ('aldryn_apphooks_config.fields.AppHookConfigField', [], {'to': u"orm['djangocms_blog.BlogConfig']", 'null': 'True'}), - 'author': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "u'djangocms_blog_post_author'", 'null': 'True', 'to': u"orm['auth.User']"}), + 'author': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "u'djangocms_blog_post_author'", 'null': 'True', 'to': u"orm['%s']" % user_orm_label}), 'categories': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'related_name': "u'blog_posts'", 'blank': 'True', 'to': u"orm['djangocms_blog.BlogCategory']"}), 'content': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "u'post_content'", 'null': 'True', 'to': "orm['cms.Placeholder']"}), 'date_created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), @@ -164,8 +169,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'}) }, @@ -194,7 +199,7 @@ class Migration(SchemaMigration): 'modified_at': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}), 'name': ('django.db.models.fields.CharField', [], {'default': "u''", 'max_length': '255', 'blank': 'True'}), 'original_filename': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}), - 'owner': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "u'owned_files'", 'null': 'True', 'to': u"orm['auth.User']"}), + 'owner': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "u'owned_files'", 'null': 'True', 'to': u"orm['%s']" % user_orm_label}), 'polymorphic_ctype': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "u'polymorphic_filer.file_set+'", 'null': 'True', 'to': u"orm['contenttypes.ContentType']"}), 'sha1': ('django.db.models.fields.CharField', [], {'default': "u''", 'max_length': '40', 'blank': 'True'}), 'uploaded_at': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}) @@ -207,7 +212,7 @@ class Migration(SchemaMigration): u'lft': ('django.db.models.fields.PositiveIntegerField', [], {'db_index': 'True'}), 'modified_at': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}), 'name': ('django.db.models.fields.CharField', [], {'max_length': '255'}), - 'owner': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "u'filer_owned_folders'", 'null': 'True', 'to': u"orm['auth.User']"}), + 'owner': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "u'filer_owned_folders'", 'null': 'True', 'to': u"orm['%s']" % user_orm_label}), 'parent': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "u'children'", 'null': 'True', 'to': u"orm['filer.Folder']"}), u'rght': ('django.db.models.fields.PositiveIntegerField', [], {'db_index': 'True'}), u'tree_id': ('django.db.models.fields.PositiveIntegerField', [], {'db_index': 'True'}), diff --git a/djangocms_blog/south_migrations/0018_auto__chg_field_post_main_image_full__chg_field_post_main_image_thumbn.py b/djangocms_blog/south_migrations/0018_auto__chg_field_post_main_image_full__chg_field_post_main_image_thumbn.py index c4c53ac..a283ca9 100644 --- a/djangocms_blog/south_migrations/0018_auto__chg_field_post_main_image_full__chg_field_post_main_image_thumbn.py +++ b/djangocms_blog/south_migrations/0018_auto__chg_field_post_main_image_full__chg_field_post_main_image_thumbn.py @@ -3,6 +3,12 @@ from south.utils import datetime_utils as datetime from south.db import db from south.v2 import SchemaMigration from django.db import models +from djangocms_blog.models import thumbnail_model +from django.contrib.auth import get_user_model + +User = get_user_model() +user_orm_label = '%s.%s' % (User._meta.app_label, User._meta.object_name) +user_model_label = '%s.%s' % (User._meta.app_label, User._meta.module_name) class Migration(SchemaMigration): @@ -37,8 +43,8 @@ class Migration(SchemaMigration): u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) }, - u'auth.user': { - 'Meta': {'object_name': 'User'}, + user_model_label: { + 'Meta': {'object_name': User.__name__, 'db_table': "'%s'" % User._meta.db_table}, 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), @@ -73,8 +79,8 @@ 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': { - 'Meta': {'ordering': "(u'width', u'height')", 'object_name': 'ThumbnailOption'}, + thumbnail_model: { + 'Meta': {'ordering': "('width', 'height')", 'object_name': 'ThumbnailOption'}, 'crop': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), 'height': ('django.db.models.fields.IntegerField', [], {}), u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), @@ -92,7 +98,7 @@ class Migration(SchemaMigration): u'djangocms_blog.authorentriesplugin': { 'Meta': {'object_name': 'AuthorEntriesPlugin'}, 'app_config': ('aldryn_apphooks_config.fields.AppHookConfigField', [], {'to': u"orm['djangocms_blog.BlogConfig']", 'null': 'True', 'blank': 'True'}), - 'authors': ('django.db.models.fields.related.ManyToManyField', [], {'to': u"orm['auth.User']", 'symmetrical': 'False'}), + 'authors': ('django.db.models.fields.related.ManyToManyField', [], {'to': u"orm['%s']" % user_orm_label, 'symmetrical': 'False'}), u'cmsplugin_ptr': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['cms.CMSPlugin']", 'unique': 'True', 'primary_key': 'True'}), 'latest_posts': ('django.db.models.fields.IntegerField', [], {'default': '5'}) }, @@ -142,7 +148,7 @@ class Migration(SchemaMigration): u'djangocms_blog.post': { 'Meta': {'ordering': "(u'-date_published', u'-date_created')", 'object_name': 'Post'}, 'app_config': ('aldryn_apphooks_config.fields.AppHookConfigField', [], {'to': u"orm['djangocms_blog.BlogConfig']", 'null': 'True'}), - 'author': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "u'djangocms_blog_post_author'", 'null': 'True', 'to': u"orm['auth.User']"}), + 'author': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "u'djangocms_blog_post_author'", 'null': 'True', 'to': u"orm['%s']" % user_orm_label}), 'categories': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'related_name': "u'blog_posts'", 'blank': 'True', 'to': u"orm['djangocms_blog.BlogCategory']"}), 'content': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "u'post_content'", 'null': 'True', 'to': "orm['cms.Placeholder']"}), 'date_created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), @@ -152,8 +158,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'}) }, @@ -182,7 +188,7 @@ class Migration(SchemaMigration): 'modified_at': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}), 'name': ('django.db.models.fields.CharField', [], {'default': "u''", 'max_length': '255', 'blank': 'True'}), 'original_filename': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}), - 'owner': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "u'owned_files'", 'null': 'True', 'to': u"orm['auth.User']"}), + 'owner': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "u'owned_files'", 'null': 'True', 'to': u"orm['%s']" % user_orm_label}), 'polymorphic_ctype': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "u'polymorphic_filer.file_set+'", 'null': 'True', 'to': u"orm['contenttypes.ContentType']"}), 'sha1': ('django.db.models.fields.CharField', [], {'default': "u''", 'max_length': '40', 'blank': 'True'}), 'uploaded_at': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}) @@ -195,7 +201,7 @@ class Migration(SchemaMigration): u'lft': ('django.db.models.fields.PositiveIntegerField', [], {'db_index': 'True'}), 'modified_at': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}), 'name': ('django.db.models.fields.CharField', [], {'max_length': '255'}), - 'owner': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "u'filer_owned_folders'", 'null': 'True', 'to': u"orm['auth.User']"}), + 'owner': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "u'filer_owned_folders'", 'null': 'True', 'to': u"orm['%s']" % user_orm_label}), 'parent': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "u'children'", 'null': 'True', 'to': u"orm['filer.Folder']"}), u'rght': ('django.db.models.fields.PositiveIntegerField', [], {'db_index': 'True'}), u'tree_id': ('django.db.models.fields.PositiveIntegerField', [], {'db_index': 'True'}), @@ -222,4 +228,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/0019_auto__chg_field_post_author__chg_field_post_main_image_full__chg_field.py b/djangocms_blog/south_migrations/0019_auto__chg_field_post_author__chg_field_post_main_image_full__chg_field.py index 5ee2cb5..a272039 100644 --- a/djangocms_blog/south_migrations/0019_auto__chg_field_post_author__chg_field_post_main_image_full__chg_field.py +++ b/djangocms_blog/south_migrations/0019_auto__chg_field_post_author__chg_field_post_main_image_full__chg_field.py @@ -4,6 +4,11 @@ from south.db import db from south.v2 import SchemaMigration from django.db import models from djangocms_blog.models import thumbnail_model +from django.contrib.auth import get_user_model + +User = get_user_model() +user_orm_label = '%s.%s' % (User._meta.app_label, User._meta.object_name) +user_model_label = '%s.%s' % (User._meta.app_label, User._meta.module_name) class Migration(SchemaMigration): @@ -12,6 +17,7 @@ class Migration(SchemaMigration): depends_on = [ ('djangocms_blog', '0018_auto__chg_field_post_main_image_full__chg_field_post_main_image_thumbn'), ('cmsplugin_filer_image', '0013_mv_thumbnailoption_to_filer'), + ('filer', '0015_auto__add_thumbnailoption'), ] needed_by = [ ('cmsplugin_filer_image', '0014_auto__del_thumbnailoption__chg_field_filerimage_thumbnail_option'), @@ -36,7 +42,7 @@ class Migration(SchemaMigration): def backwards(self, orm): # Changing field 'Post.author' - db.alter_column('djangocms_blog_post', 'author_id', self.gf('django.db.models.fields.related.ForeignKey')(null=True, to=orm['auth.User'])) + db.alter_column('djangocms_blog_post', 'author_id', self.gf('django.db.models.fields.related.ForeignKey')(null=True, to=orm[user_orm_label])) # Changing field 'Post.main_image_full' db.alter_column('djangocms_blog_post', 'main_image_full_id', self.gf('django.db.models.fields.related.ForeignKey')(on_delete=models.SET_NULL, null=True, to=orm[thumbnail_model])) @@ -58,6 +64,32 @@ class Migration(SchemaMigration): 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) }, + user_model_label: { + 'Meta': {'object_name': User.__name__, 'db_table': "'%s'" % User._meta.db_table}, + 'date_joined': ( + 'django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), + 'email': ( + 'django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), + 'first_name': ( + 'django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), + 'groups': ('django.db.models.fields.related.ManyToManyField', [], + {'symmetrical': 'False', 'related_name': "u'user_set'", 'blank': 'True', + 'to': u"orm['auth.Group']"}), + u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), + 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), + 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), + 'last_login': ( + 'django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), + 'last_name': ( + 'django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), + 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), + 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], + {'symmetrical': 'False', 'related_name': "u'user_set'", + 'blank': 'True', 'to': u"orm['auth.Permission']"}), + 'username': ( + 'django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) + }, 'cms.cmsplugin': { 'Meta': {'object_name': 'CMSPlugin'}, 'changed_date': ('django.db.models.fields.DateTimeField', [], {'blank': 'True', 'auto_now': 'True'}), @@ -85,6 +117,15 @@ class Migration(SchemaMigration): 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) }, + thumbnail_model: { + 'Meta': {'ordering': "('width', 'height')", 'object_name': 'ThumbnailOption'}, + 'crop': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), + 'height': ('django.db.models.fields.IntegerField', [], {}), + u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}), + 'upscale': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), + 'width': ('django.db.models.fields.IntegerField', [], {}) + }, 'djangocms_blog.authorentriesplugin': { 'Meta': {'object_name': 'AuthorEntriesPlugin'}, 'app_config': ('aldryn_apphooks_config.fields.AppHookConfigField', [], {'blank': 'True', 'to': "orm['djangocms_blog.BlogConfig']", 'null': 'True'}), @@ -148,8 +189,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', 'null': 'True', 'to': "orm['filer.Image']", 'related_name': "'djangocms_blog_post_image'"}), - 'main_image_full': ('django.db.models.fields.related.ForeignKey', [], {'on_delete': 'models.SET_NULL', 'blank': 'True', 'null': 'True', 'to': "orm['filer.ThumbnailOption']", 'related_name': "'djangocms_blog_post_full'"}), - 'main_image_thumbnail': ('django.db.models.fields.related.ForeignKey', [], {'on_delete': 'models.SET_NULL', 'blank': 'True', 'null': 'True', 'to': "orm['filer.ThumbnailOption']", 'related_name': "'djangocms_blog_post_thumbnail'"}), + 'main_image_full': ('django.db.models.fields.related.ForeignKey', [], {'on_delete': 'models.SET_NULL', 'blank': 'True', 'null': 'True', 'to': u"orm['%s']" % thumbnail_model, 'related_name': "'djangocms_blog_post_full'"}), + 'main_image_thumbnail': ('django.db.models.fields.related.ForeignKey', [], {'on_delete': 'models.SET_NULL', 'blank': 'True', 'null': 'True', 'to': u"orm['%s']" % thumbnail_model, 'related_name': "'djangocms_blog_post_thumbnail'"}), 'publish': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), 'sites': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'blank': 'True', 'to': "orm['sites.Site']"}) }, @@ -210,15 +251,6 @@ class Migration(SchemaMigration): 'must_always_publish_copyright': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), 'subject_location': ('django.db.models.fields.CharField', [], {'default': "''", 'blank': 'True', 'max_length': '64'}) }, - 'filer.thumbnailoption': { - 'Meta': {'object_name': 'ThumbnailOption', 'ordering': "('width', 'height')"}, - 'crop': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'height': ('django.db.models.fields.IntegerField', [], {}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'upscale': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'width': ('django.db.models.fields.IntegerField', [], {}) - }, 'sites.site': { 'Meta': {'object_name': 'Site', 'db_table': "'django_site'", 'ordering': "('domain',)"}, 'domain': ('django.db.models.fields.CharField', [], {'max_length': '100'}), diff --git a/tests/test_utils/migrations/0001_initial.py b/tests/test_utils/migrations/0001_initial.py index be4824e..8eb5613 100644 --- a/tests/test_utils/migrations/0001_initial.py +++ b/tests/test_utils/migrations/0001_initial.py @@ -10,8 +10,8 @@ import django.contrib.auth.models class Migration(migrations.Migration): dependencies = [ - ('auth', '0006_require_contenttypes_0002'), - ('sites', '0001_initial'), + ('auth', '__first__'), + ('sites', '__first__'), ] operations = [ @@ -38,8 +38,6 @@ class Migration(migrations.Migration): 'abstract': False, 'verbose_name_plural': 'users', }, - managers=[ - ('objects', django.contrib.auth.models.UserManager()), - ], + bases=(models.Model,), ), ] diff --git a/tests/test_utils/south_migrations/0001_initial.py b/tests/test_utils/south_migrations/0001_initial.py index 7d5f61d..5edeace 100644 --- a/tests/test_utils/south_migrations/0001_initial.py +++ b/tests/test_utils/south_migrations/0001_initial.py @@ -112,4 +112,4 @@ class Migration(SchemaMigration): } } - complete_apps = ['test_utils'] \ No newline at end of file + complete_apps = ['test_utils'] From 9b65a24c296b065a3a3cd09d4fcb76abe5dddb1b Mon Sep 17 00:00:00 2001 From: Iacopo Spalletti Date: Sun, 29 May 2016 02:37:04 +0200 Subject: [PATCH 3/4] Enable migrations during tests --- tox.ini | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tox.ini b/tox.ini index 3816413..0828e1e 100644 --- a/tox.ini +++ b/tox.ini @@ -2,7 +2,7 @@ envlist = pep8,isort,py{35,34,27}-django{19}-{cms33,cms32,knocker},py{35,34,33,27}-django{18}-cms{33,32,31},py{34,33,27}-django{17,16}-cms{32,31,30},py{26}-django16-cms{31,30} [testenv] -commands = {env:COMMAND:python} cms_helper.py test djangocms_blog --no-migrate +commands = {env:COMMAND:python} cms_helper.py test djangocms_blog deps = django16: Django>=1.6,<1.7 django16: django-taggit<0.18 From aaa3d3f2ef7bc7a3cbba1dd22641b957ea3ce96f Mon Sep 17 00:00:00 2001 From: Iacopo Spalletti Date: Sun, 29 May 2016 02:51:41 +0200 Subject: [PATCH 4/4] Edit readme --- README.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.rst b/README.rst index 1321830..a2c2d1b 100644 --- a/README.rst +++ b/README.rst @@ -44,7 +44,7 @@ Supported django CMS versions: * django CMS 3.x .. warning:: Version 0.8 will be the last one supporting Python 2.6, Python 3.3, - Django<=1.7 and django CMS<=3.1. + Django<=1.8 and django CMS<=3.2. .. warning:: Starting from version 0.8, date_published is not set anymore when creating a post but rather when publishing.