diff --git a/.travis.yml b/.travis.yml index 5ee0640..5a370da 100644 --- a/.travis.yml +++ b/.travis.yml @@ -14,9 +14,11 @@ env: - TOXENV='pep8' - TOXENV='isort' - TOXENV='docs' + - 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' diff --git a/HISTORY.rst b/HISTORY.rst index 61c5d9e..b578650 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -8,6 +8,7 @@ History 0.9.0 (unreleased) ****************** +* Added support for django CMS 3.4 * Dropped support for Django<1.8, django CMS<3.2. * Added liveblog application. * Refactored plugin filters: by default only data for current site are now shown. @@ -19,7 +20,14 @@ History * Improved category admin to avoid circular relationships. ****************** -0.8.6 (unreleased) +0.8.7 (2016-08-25) +****************** + +* Added support for django CMS 3.4 +* Fixed issue with multisite support + +****************** +0.8.6 (2016-08-03) ****************** * Set the correct language during indexing diff --git a/djangocms_blog/__init__.py b/djangocms_blog/__init__.py index d15ba89..1a72077 100644 --- a/djangocms_blog/__init__.py +++ b/djangocms_blog/__init__.py @@ -3,6 +3,6 @@ from __future__ import absolute_import, print_function, unicode_literals __author__ = 'Iacopo Spalletti' __email__ = 'i.spalletti@nephila.it' -__version__ = '0.9a1' +__version__ = '0.9b1' default_app_config = 'djangocms_blog.apps.BlogAppConfig' diff --git a/djangocms_blog/admin.py b/djangocms_blog/admin.py index 7de8b86..ce10d10 100755 --- a/djangocms_blog/admin.py +++ b/djangocms_blog/admin.py @@ -161,12 +161,10 @@ class PostAdmin(PlaceholderAdminMixin, FrontendEditableAdminMixin, :param request: current request :return: boolean or a queryset of available sites """ - if self._sites is None: - try: - self._sites = request.user.get_sites() - except AttributeError: # pragma: no cover - self._sites = Site.objects.none() - return self._sites + try: + return request.user.get_sites() + except AttributeError: # pragma: no cover + return Site.objects.none() def _set_config_defaults(self, request, form, obj=None): form = super(PostAdmin, self)._set_config_defaults(request, form, obj) diff --git a/djangocms_blog/locale/fr/LC_MESSAGES/django.po b/djangocms_blog/locale/fr/LC_MESSAGES/django.po index 7c58a9b..f07e7db 100644 --- a/djangocms_blog/locale/fr/LC_MESSAGES/django.po +++ b/djangocms_blog/locale/fr/LC_MESSAGES/django.po @@ -3,12 +3,13 @@ # # Translators: # Iacopo Spalletti, 2014 +# yakky , 2016 msgid "" msgstr "" "Project-Id-Version: djangocms-blog\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2016-05-05 08:48+0200\n" -"PO-Revision-Date: 2016-05-05 06:48+0000\n" +"PO-Revision-Date: 2016-08-25 13:38+0000\n" "Last-Translator: yakky \n" "Language-Team: French (http://www.transifex.com/nephila/djangocms-blog/language/fr/)\n" "MIME-Version: 1.0\n" @@ -41,12 +42,12 @@ msgstr "Nom de l’objet" #: cms_appconfig.py:27 #| msgid "blog categories" msgid "blog config" -msgstr "Catégorie du blog" +msgstr "Configuration du blog" #: cms_appconfig.py:28 #| msgid "blog categories" msgid "blog configs" -msgstr "Catégories du blog" +msgstr "Configurations du blog" #: cms_appconfig.py:31 msgid "untitled" @@ -183,7 +184,7 @@ msgstr "" #: cms_menus.py:28 msgid "Blog menu" -msgstr "Catégorie du blog" +msgstr "Menu du blog" #: cms_toolbar.py:23 msgid "Post list" 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/djangocms_blog/migrations/0026_merge.py b/djangocms_blog/migrations/0026_merge.py new file mode 100644 index 0000000..0d0ad8c --- /dev/null +++ b/djangocms_blog/migrations/0026_merge.py @@ -0,0 +1,16 @@ +# -*- coding: utf-8 -*- +# Generated by Django 1.9.9 on 2016-08-25 20:24 +from __future__ import unicode_literals + +from django.db import migrations + + +class Migration(migrations.Migration): + + dependencies = [ + ('djangocms_blog', '0021_auto_20160823_2008'), + ('djangocms_blog', '0025_auto_20160803_0858'), + ] + + operations = [ + ] diff --git a/tests/test_models.py b/tests/test_models.py index 2af2b04..da5168a 100644 --- a/tests/test_models.py +++ b/tests/test_models.py @@ -854,7 +854,7 @@ class ModelsTest2(BaseTest): '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())) @@ -895,7 +895,7 @@ class ModelsTest2(BaseTest): '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 3f03d6b..551c20e 100644 --- a/tox.ini +++ b/tox.ini @@ -1,5 +1,5 @@ [tox] -envlist = pep8,isort,docs,py{35,34,27}-django{19}-{cms33,cms32,knocker},py{35,34,33,27}-django{18}-cms{33,32} +envlist = pep8,isort,docs,py{35,34,27}-django{19}-{cms34,cms33,cms32,knocker},py{35,34,33,27}-django{18}-cms{34,33,32} [testenv] commands = {env:COMMAND:python} cms_helper.py test djangocms_blog @@ -17,10 +17,12 @@ 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: channels>=0.15 knocker: https://github.com/nephila/django-knocker/archive/master.zip?0.1.1 - knocker: djangocms-text-ckeditor<3.0 + knocker: djangocms-text-ckeditor>=3.0 django-meta>=1.2 html5lib<0.99999999 https://github.com/nephila/djangocms-helper/archive/develop.zip