diff --git a/.travis.yml b/.travis.yml index f16c2f8a0dc..5e4e1d57225 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,5 +1,6 @@ language: python python: + - "2.5" - "2.6" - "2.7" env: diff --git a/cms/middleware/multilingual.py b/cms/middleware/multilingual.py index 85a330f9c42..1d6c5aa35bd 100644 --- a/cms/middleware/multilingual.py +++ b/cms/middleware/multilingual.py @@ -1,4 +1,5 @@ # -*- coding: utf-8 -*- +from __future__ import with_statement from cms.test_utils.util.context_managers import SettingsOverride from cms.utils.i18n import get_default_language from django.conf import settings diff --git a/cms/models/placeholdermodel.py b/cms/models/placeholdermodel.py index be6c6a335a1..d921e85f1ff 100644 --- a/cms/models/placeholdermodel.py +++ b/cms/models/placeholdermodel.py @@ -126,8 +126,7 @@ def _get_attached_models(self): """ return [field.model for field in self._get_attached_fields()] - @property - def page(self): + def page_getter(self): if not hasattr(self, '_page'): from cms.models.pagemodel import Page try: @@ -136,10 +135,11 @@ def page(self): self._page = None return self._page - @page.setter - def page(self, value): + def page_setter(self, value): self._page = value + page = property(page_getter, page_setter) + def get_plugins_list(self): return list(self.get_plugins()) diff --git a/cms/sitemaps/cms_sitemap.py b/cms/sitemaps/cms_sitemap.py index a013e839d30..f441fce1afb 100644 --- a/cms/sitemaps/cms_sitemap.py +++ b/cms/sitemaps/cms_sitemap.py @@ -1,6 +1,13 @@ # -*- coding: utf-8 -*- from django.contrib.sitemaps import Sitemap -import itertools + +def from_iterable(iterables): + """ + Backport of itertools.chain.from_iterable + """ + for it in iterables: + for element in it: + yield element class CMSSitemap(Sitemap): changefreq = "monthly" @@ -15,7 +22,7 @@ def items(self): def lastmod(self, page): modification_dates = [page.changed_date, page.publication_date] plugins_for_placeholder = lambda placeholder: placeholder.cmsplugin_set.all() - plugins = itertools.chain.from_iterable(map(plugins_for_placeholder, page.placeholders.all())) + plugins = from_iterable(map(plugins_for_placeholder, page.placeholders.all())) plugin_modification_dates = map(lambda plugin: plugin.changed_date, plugins) modification_dates.extend(plugin_modification_dates) return max(modification_dates) diff --git a/docs/index.rst b/docs/index.rst index 2ebc0d43012..edac94d4d87 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -9,6 +9,20 @@ Welcome to django CMS's documentation! This document refers to version |release| +******* +Install +******* + +.. toctree:: + :maxdepth: 1 + + getting_started/installation + upgrade/2.3.3 + upgrade/2.3.2 + upgrade/2.3 + upgrade/2.2 + upgrade/2.1 + *************** Getting Started *************** @@ -17,8 +31,6 @@ Getting Started :maxdepth: 2 :numbered: - getting_started/installation - upgrade/index getting_started/tutorial getting_started/using_south getting_started/configuration diff --git a/docs/upgrade/2.3.2.rst b/docs/upgrade/2.3.2.rst index ed32fc638dc..907944e5666 100644 --- a/docs/upgrade/2.3.2.rst +++ b/docs/upgrade/2.3.2.rst @@ -7,7 +7,7 @@ What's new in 2.3.2 ******************* Google map plugin -=================== +================= Google map plugin now supports width and height fields so that plugin size can be modified in the page admin or frontend editor. diff --git a/docs/upgrade/2.3.3.rst b/docs/upgrade/2.3.3.rst new file mode 100644 index 00000000000..f961dc2c870 --- /dev/null +++ b/docs/upgrade/2.3.3.rst @@ -0,0 +1,19 @@ +################### +2.3.3 release notes +################### + +******************* +What's new in 2.3.3 +******************* + +Restored Python 2.5 support +=========================== + +2.3.3 restores Python 2.5 suppport for the django CMS. + + +******************** +Pending deprecations +******************** + +Python 2.5 support will be dropped in django CMS 2.4. diff --git a/docs/upgrade/index.rst b/docs/upgrade/index.rst deleted file mode 100644 index e85b703f28b..00000000000 --- a/docs/upgrade/index.rst +++ /dev/null @@ -1,39 +0,0 @@ -################################### -Upgrading a django CMS installation -################################### - -************* -2.3.2 Release -************* - -.. toctree:: - :maxdepth: 1 - - 2.3.2 - -*********** -2.3 Release -*********** - -.. toctree:: - :maxdepth: 1 - - 2.3 - -*********** -2.2 Release -*********** - -.. toctree:: - :maxdepth: 1 - - 2.2 - -****************** -Upgrade from 2.1.x -****************** - -.. toctree:: - :maxdepth: 1 - - 2.1 \ No newline at end of file