From 6dd9176617a723c812aa19c547c426f770780942 Mon Sep 17 00:00:00 2001 From: Iacopo Spalletti Date: Tue, 23 Aug 2016 19:59:22 +0200 Subject: [PATCH] xAdd support for django CMS 3.4 --- .travis.yml | 16 ++++++++ .../migrations/0021_auto_20160823_2008.py | 41 +++++++++++++++++++ setup.py | 1 + tests/test_models.py | 4 +- tox.ini | 6 ++- 5 files changed, 64 insertions(+), 4 deletions(-) create mode 100644 djangocms_blog/migrations/0021_auto_20160823_2008.py diff --git a/.travis.yml b/.travis.yml index 67278a0..beb8d7f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -15,8 +15,12 @@ env: matrix: - TOXENV='pep8' - TOXENV='isort' + - DJANGO='django19' CMS='cms34' + - DJANGO='django19' CMS='cms33' - DJANGO='django19' CMS='cms32' - DJANGO='django19' CMS='knocker' + - DJANGO='django18' CMS='cms34' + - DJANGO='django18' CMS='cms33' - DJANGO='django18' CMS='cms32' - DJANGO='django18' CMS='cms31' - DJANGO='django17' CMS='cms32' @@ -73,12 +77,24 @@ matrix: env: DJANGO='django18' CMS='cms31' - python: 2.6 env: DJANGO='django18' CMS='cms32' + - python: 2.6 + env: DJANGO='django18' CMS='cms33' + - python: 2.6 + env: DJANGO='django18' CMS='cms34' - python: 2.6 env: DJANGO='django19' CMS='cms32' + - python: 2.6 + env: DJANGO='django19' CMS='cms33' + - python: 2.6 + env: DJANGO='django19' CMS='cms34' - python: 2.6 env: DJANGO='django19' CMS='knocker' - python: 3.3 env: DJANGO='django19' CMS='cms32' + - python: 3.3 + env: DJANGO='django19' CMS='cms33' + - python: 3.3 + env: DJANGO='django19' CMS='cms34' - python: 3.3 env: DJANGO='django19' CMS='knocker' - python: 3.5 diff --git a/djangocms_blog/migrations/0021_auto_20160823_2008.py b/djangocms_blog/migrations/0021_auto_20160823_2008.py new file mode 100644 index 0000000..5ab8fb4 --- /dev/null +++ b/djangocms_blog/migrations/0021_auto_20160823_2008.py @@ -0,0 +1,41 @@ +# -*- coding: utf-8 -*- +# Generated by Django 1.9.9 on 2016-08-23 18:08 +from __future__ import unicode_literals + +from django.db import migrations, models +import django.db.models.deletion + + +class Migration(migrations.Migration): + + dependencies = [ + ('djangocms_blog', '0020_thumbnail_move4'), + ] + + operations = [ + migrations.AlterField( + model_name='authorentriesplugin', + name='cmsplugin_ptr', + field=models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, related_name='djangocms_blog_authorentriesplugin', serialize=False, to='cms.CMSPlugin'), + ), + migrations.AlterField( + model_name='genericblogplugin', + name='cmsplugin_ptr', + field=models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, related_name='djangocms_blog_genericblogplugin', serialize=False, to='cms.CMSPlugin'), + ), + migrations.AlterField( + model_name='latestpostsplugin', + name='cmsplugin_ptr', + field=models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, related_name='djangocms_blog_latestpostsplugin', serialize=False, to='cms.CMSPlugin'), + ), + migrations.AlterField( + model_name='post', + name='main_image_full', + field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='djangocms_blog_post_full', to='filer.ThumbnailOption', verbose_name='main image full'), + ), + migrations.AlterField( + model_name='post', + name='main_image_thumbnail', + field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='djangocms_blog_post_thumbnail', to='filer.ThumbnailOption', verbose_name='main image thumbnail'), + ), + ] diff --git a/setup.py b/setup.py index 1d7fdc9..dae671b 100755 --- a/setup.py +++ b/setup.py @@ -60,6 +60,7 @@ setup( 'Framework :: Django :: 1.6', 'Framework :: Django :: 1.7', 'Framework :: Django :: 1.8', + 'Framework :: Django :: 1.9', 'Programming Language :: Python :: 2', 'Programming Language :: Python :: 2.6', 'Programming Language :: Python :: 2.7', diff --git a/tests/test_models.py b/tests/test_models.py index befba6b..f94c3e0 100644 --- a/tests/test_models.py +++ b/tests/test_models.py @@ -733,7 +733,7 @@ class ModelsTest(BaseTest): else: plugins = list(post1.content.cmsplugin_set.filter(language='en').order_by('path', 'depth', 'position')) copy_plugins_to(plugins, post2.content) - new = downcast_plugins(post2.content.cmsplugin_set.all()) + new = list(downcast_plugins(post2.content.cmsplugin_set.all())) self.assertEqual(set(new[0].tags.all()), set([tag1, tag2])) self.assertEqual(set(new[0].tags.all()), set(plugin.tags.all())) @@ -766,7 +766,7 @@ class ModelsTest(BaseTest): else: plugins = list(post1.content.cmsplugin_set.filter(language='en').order_by('path', 'depth', 'position')) copy_plugins_to(plugins, post2.content) - new = downcast_plugins(post2.content.cmsplugin_set.all()) + new = list(downcast_plugins(post2.content.cmsplugin_set.all())) self.assertEqual(set(new[0].authors.all()), set([self.user])) def test_multisite(self): diff --git a/tox.ini b/tox.ini index ae85931..f339fb7 100644 --- a/tox.ini +++ b/tox.ini @@ -1,5 +1,5 @@ [tox] -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} +envlist = pep8,isort,py{35,34,27}-django{19}-{cms34,cms33,cms32,knocker},py{35,34,33,27}-django{18}-cms{34,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 @@ -34,7 +34,9 @@ deps = cms32: djangocms-text-ckeditor<3.0 cms33: https://github.com/divio/django-cms/archive/release/3.3.x.zip cms33: djangocms-text-ckeditor>=3.0 - knocker: https://github.com/divio/django-cms/archive/release/3.2.x.zip + cms34: https://github.com/divio/django-cms/archive/develop.zip + cms34: djangocms-text-ckeditor>=3.0 + knocker: https://github.com/divio/django-cms/archive/release/3.3.x.zip knocker: https://github.com/nephila/django-knocker/archive/master.zip?0.1.1 knocker: djangocms-text-ckeditor<3.0 django-meta>=1.2