Skip to content

Commit d1c5e2b

Browse files
committed
Add support for Django 1.10. Drop older versions.
1 parent 4364724 commit d1c5e2b

13 files changed

+42
-143
lines changed

.travis.yml

+1-61
Original file line numberDiff line numberDiff line change
@@ -7,35 +7,25 @@ sudo: false
77
python:
88
- 3.5
99
- 3.4
10-
- 3.3
1110
- 2.7
12-
- 2.6
1311

1412
env:
1513
matrix:
1614
- TOXENV='pep8'
1715
- TOXENV='docs'
1816
- TOXENV='isort'
19-
- DJANGO='django16' CMS='cms30'
20-
- DJANGO='django16' CMS='cms31'
21-
- DJANGO='django16' CMS='cms32'
22-
- DJANGO='django17' CMS='cms30'
23-
- DJANGO='django17' CMS='cms31'
24-
- DJANGO='django17' CMS='cms32'
25-
- DJANGO='django18' CMS='cms31'
2617
- DJANGO='django18' CMS='cms32'
2718
- DJANGO='django18' CMS='cms33'
2819
- DJANGO='django18' CMS='cms34'
2920
- DJANGO='django19' CMS='cms32'
3021
- DJANGO='django19' CMS='cms33'
3122
- DJANGO='django19' CMS='cms34'
23+
- DJANGO='django110' CMS='cms34'
3224

3325
# command to install dependencies, e.g. pip install -r requirements.txt --use-mirrors
3426
install:
3527
- pip install -U tox>=1.8 coveralls
36-
- "if [[ $TRAVIS_PYTHON_VERSION == '2.6' ]]; then export PYVER=py26; fi"
3728
- "if [[ $TRAVIS_PYTHON_VERSION == '2.7' ]]; then export PYVER=py27; fi"
38-
- "if [[ $TRAVIS_PYTHON_VERSION == '3.3' ]]; then export PYVER=py33; fi"
3929
- "if [[ $TRAVIS_PYTHON_VERSION == '3.4' ]]; then export PYVER=py34; fi"
4030
- "if [[ $TRAVIS_PYTHON_VERSION == '3.5' ]]; then export PYVER=py35; fi"
4131
- "if [[ ${DJANGO}z != 'z' ]]; then export TOXENV=$PYVER-$DJANGO-$CMS; fi"
@@ -51,65 +41,15 @@ after_success:
5141

5242
matrix:
5343
exclude:
54-
- python: 2.6
55-
env: TOXENV='pep8'
56-
- python: 2.6
57-
env: TOXENV='isort'
58-
- python: 2.6
59-
env: TOXENV='docs'
6044
- python: 2.7
6145
env: TOXENV='pep8'
6246
- python: 2.7
6347
env: TOXENV='isort'
6448
- python: 2.7
6549
env: TOXENV='docs'
66-
- python: 3.3
67-
env: TOXENV='pep8'
68-
- python: 3.3
69-
env: TOXENV='isort'
70-
- python: 3.3
71-
env: TOXENV='docs'
7250
- python: 3.4
7351
env: TOXENV='pep8'
7452
- python: 3.4
7553
env: TOXENV='isort'
7654
- python: 3.4
7755
env: TOXENV='docs'
78-
- python: 2.6
79-
env: DJANGO='django17' CMS='cms30'
80-
- python: 2.6
81-
env: DJANGO='django17' CMS='cms31'
82-
- python: 2.6
83-
env: DJANGO='django17' CMS='cms32'
84-
- python: 2.6
85-
env: DJANGO='django18' CMS='cms31'
86-
- python: 2.6
87-
env: DJANGO='django18' CMS='cms32'
88-
- python: 2.6
89-
env: DJANGO='django18' CMS='cms33'
90-
- python: 2.6
91-
env: DJANGO='django18' CMS='cms34'
92-
- python: 2.6
93-
env: DJANGO='django19' CMS='cms32'
94-
- python: 2.6
95-
env: DJANGO='django19' CMS='cms33'
96-
- python: 2.6
97-
env: DJANGO='django19' CMS='cms34'
98-
- python: 3.3
99-
env: DJANGO='django19' CMS='cms32'
100-
- python: 3.3
101-
env: DJANGO='django19' CMS='cms33'
102-
- python: 3.3
103-
env: DJANGO='django19' CMS='cms34'
104-
- python: 3.5
105-
env: DJANGO='django16' CMS='cms30'
106-
- python: 3.5
107-
env: DJANGO='django16' CMS='cms31'
108-
- python: 3.5
109-
env: DJANGO='django16' CMS='cms32'
110-
- python: 3.5
111-
env: DJANGO='django17' CMS='cms30'
112-
- python: 3.5
113-
env: DJANGO='django17' CMS='cms31'
114-
- python: 3.5
115-
env: DJANGO='django17' CMS='cms32'

HISTORY.rst

+7
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,13 @@
44
History
55
*******
66

7+
0.7.0 (unreleased)
8+
==================
9+
10+
* Drop Django 1.7 and below
11+
* Drop django CMS 3.1 and below
12+
* Add Django 1.10 support
13+
714
0.6.3 (2016-10-22)
815
==================
916

README.rst

+7-20
Original file line numberDiff line numberDiff line change
@@ -32,27 +32,14 @@ djangocms-page-meta
3232

3333
Meta tag information for django CMS 3 pages
3434

35-
Support Python version:
35+
Python: 2.7, 3.4, 3.5
3636

37-
* Python 2.6
38-
* Python 2.7
39-
* Python 3.3
40-
* Python 3.4
41-
* Python 3.5
37+
Django: 1.8 to 1.10
4238

43-
Supported Django versions:
39+
django CMS: 3.2 to 3.4
4440

45-
* Django 1.6
46-
* Django 1.7
47-
* Django 1.8
48-
* Django 1.9
49-
50-
Supported django CMS versions:
51-
52-
* django CMS 3.x
53-
54-
.. warning:: Version 0.6 will be the last one supporting Python 2.6, Python 3.3,
55-
Django<1.8 and django CMS<3.2.
41+
.. warning:: Since version 0.7, the support for Python 2.6, Python 3.3, Django<1.8 and django CMS<3.2
42+
has been dropped
5643

5744

5845
**********
@@ -91,8 +78,8 @@ Quickstart
9178
Dependencies
9279
============
9380

94-
* `django-filer`_ >= 0.9.5
95-
* `django-meta`_ >= 1.0
81+
* `django-filer`_ >= 1.2
82+
* `django-meta`_ >= 1.3
9683

9784
.. _django-filer: https://pypi.python.org/pypi/django-filer
9885
.. _django-meta: https://pypi.python.org/pypi/django-meta

djangocms_page_meta/__init__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# -*- coding: utf-8 -*-
22
from __future__ import absolute_import, print_function, unicode_literals
33

4-
__version__ = '0.6.3.post1'
4+
__version__ = '0.7.0.dev1'
55
__author__ = 'Iacopo Spalletti <[email protected]>'
66

77
default_app_config = 'djangocms_page_meta.apps.PageMetaConfig'

djangocms_page_meta/cms_toolbar.py

-4
This file was deleted.

djangocms_page_meta/cms_toolbars.py

+1-4
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
from __future__ import absolute_import, print_function, unicode_literals
33

44
from cms.api import get_page_draft
5+
from cms.cms_toolbars import PAGE_MENU_SECOND_BREAK
56
from cms.toolbar.items import Break
67
from cms.toolbar_base import CMSToolbar
78
from cms.toolbar_pool import toolbar_pool
@@ -18,10 +19,6 @@
1819
except ImportError:
1920
from cms.utils.permissions import has_page_change_permission
2021

21-
try:
22-
from cms.cms_toolbars import PAGE_MENU_SECOND_BREAK
23-
except ImportError:
24-
from cms.cms_toolbar import PAGE_MENU_SECOND_BREAK
2522

2623
PAGE_META_MENU_TITLE = _('Meta-information')
2724
PAGE_META_ITEM_TITLE = _('Common')

djangocms_page_meta/utils.py

+2-14
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,17 @@
11
# -*- coding: utf-8 -*-
22
from __future__ import absolute_import, print_function, unicode_literals
33

4-
import django
4+
from django.template.loader import render_to_string
55
from django.utils.safestring import mark_safe
66
from django.utils.translation import get_language_from_request
77
from meta import settings as meta_settings
88

9-
if django.get_version() >= '1.8':
10-
from django.template.loader import render_to_string
11-
else:
12-
from django.template import loader, RequestContext
13-
14-
def render_to_string(template_name, context=None, request=None):
15-
context_instance = RequestContext(request) if request else None
16-
return loader.render_to_string(template_name, context, context_instance)
17-
189

1910
def get_cache_key(page, language):
2011
"""
2112
Create the cache key for the current page and language
2213
"""
23-
try:
24-
from cms.cache import _get_cache_key
25-
except ImportError:
26-
from cms.templatetags.cms_tags import _get_cache_key
14+
from cms.cache import _get_cache_key
2715
site_id = page.site_id
2816
return _get_cache_key('page_meta', page, language, site_id)
2917

requirements.txt

-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1 @@
11
-e .
2-
wheel

setup.cfg

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
[flake8]
2-
exclude = *.egg-info,.git,.settings,.tox,build,dist,docs,requirements,tmp,*migrations*,*south_migrations*,tests,data
2+
exclude = *.egg-info,*.eggs,.git,.settings,.tox,build,dist,docs,requirements,tmp,*migrations*,*south_migrations*,tests,data
3+
ignore = E305
34
max-line-length = 99
45

56
[metadata]
@@ -16,4 +17,4 @@ default_section = THIRDPARTY
1617
include_trailing_comma = true
1718
known_first_party = djangocms_page_meta
1819
multi_line_output = 5
19-
not_skip = __init__.py
20+
not_skip = __init__.py

setup.py

+4-7
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,9 @@
3636
],
3737
include_package_data=True,
3838
install_requires=(
39-
'django-cms>=3.0',
40-
'django-meta>=1.3b1',
41-
'django-filer>=0.9.5',
39+
'django-cms>=3.2',
40+
'django-meta>=1.3',
41+
'django-filer>=1.2',
4242
),
4343
license='BSD',
4444
zip_safe=False,
@@ -51,15 +51,12 @@
5151
'License :: OSI Approved :: BSD License',
5252
'Natural Language :: English',
5353
'Framework :: Django',
54-
'Framework :: Django :: 1.6',
55-
'Framework :: Django :: 1.7',
5654
'Framework :: Django :: 1.8',
5755
'Framework :: Django :: 1.9',
56+
'Framework :: Django :: 1.10',
5857
'Programming Language :: Python :: 2',
59-
'Programming Language :: Python :: 2.6',
6058
'Programming Language :: Python :: 2.7',
6159
'Programming Language :: Python :: 3',
62-
'Programming Language :: Python :: 3.3',
6360
'Programming Language :: Python :: 3.4',
6461
'Programming Language :: Python :: 3.5',
6562
],

tests/test_toolbar.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
from django.test.utils import override_settings
99
from django.utils.encoding import force_text
1010

11-
from djangocms_page_meta.cms_toolbar import PAGE_META_ITEM_TITLE, PAGE_META_MENU_TITLE
11+
from djangocms_page_meta.cms_toolbars import PAGE_META_ITEM_TITLE, PAGE_META_MENU_TITLE
1212
from djangocms_page_meta.models import PageMeta, TitleMeta
1313

1414
from . import BaseTest

tests/test_utils/urls.py

+8-8
Original file line numberDiff line numberDiff line change
@@ -3,26 +3,26 @@
33

44
from cms.utils.conf import get_cms_setting
55
from django.conf import settings
6-
from django.conf.urls import include, patterns, url
6+
from django.conf.urls import include, url
77
from django.conf.urls.i18n import i18n_patterns
88
from django.contrib import admin
99
from django.contrib.staticfiles.urls import staticfiles_urlpatterns
10+
from django.views.i18n import javascript_catalog
11+
from django.views.static import serve
1012

1113
admin.autodiscover()
1214

13-
urlpatterns = patterns(
14-
'',
15+
urlpatterns = [
1516
url(r'^admin/', include(admin.site.urls)),
16-
url(r'^media/(?P<path>.*)$', 'django.views.static.serve',
17+
url(r'^media/(?P<path>.*)$', serve,
1718
{'document_root': settings.MEDIA_ROOT, 'show_indexes': True}),
18-
url(r'^media/cms/(?P<path>.*)$', 'django.views.static.serve',
19+
url(r'^media/cms/(?P<path>.*)$', serve,
1920
{'document_root': get_cms_setting('MEDIA_ROOT'), 'show_indexes': True}),
20-
url(r'^jsi18n/(?P<packages>\S+?)/$', 'django.views.i18n.javascript_catalog'),
21-
)
21+
url(r'^jsi18n/(?P<packages>\S+?)/$', javascript_catalog),
22+
]
2223

2324
urlpatterns += staticfiles_urlpatterns()
2425

2526
urlpatterns += i18n_patterns(
26-
'',
2727
url(r'^', include('cms.urls')),
2828
)

tox.ini

+7-20
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,9 @@
11
[tox]
2-
envlist = docs,pep8,isort,py{35,34,27}-django{19}-cms{34,33,32},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}
2+
envlist = docs,pep8,isort,py{35,34,27}-django{110}-cms{34},py{35,34,27}-django{19}-cms{34,33,32},py{35,34,27}-django{18}-cms{34,33,32}
33

44
[testenv]
55
commands = {env:COMMAND:python} setup.py test
66
deps =
7-
django16: Django>=1.6,<1.7
8-
django16: https://github.com/divio/django-formtools/archive/master.zip
9-
django16: django-polymorphic<0.8
10-
django16: django-treebeard<4.0
11-
django16: django-mptt<0.8
12-
django16: django-taggit<0.18
13-
django17: Django>=1.7,<1.8
14-
django17: django-mptt<0.8
15-
django17: django-taggit<0.18
16-
django17: django-polymorphic<0.9
177
django18: Django>=1.8,<1.9
188
django18: django-mptt>=0.8
199
django18: django-taggit>=0.18
@@ -22,17 +12,14 @@ deps =
2212
django19: django-mptt>=0.8
2313
django19: django-taggit>=0.18
2414
django19: django-polymorphic<0.9
25-
cms30: https://github.com/divio/django-cms/archive/release/3.0.x.zip
26-
cms31: https://github.com/divio/django-cms/archive/release/3.1.x.zip
15+
django110: Django>=1.10,<1.11
16+
django110: django-mptt>=0.8
17+
django110: django-taggit>=0.18
18+
django110: django-polymorphic>=0.9
19+
django110: https://github.com/divio/django-filer/archive/develop.zip
2720
cms32: https://github.com/divio/django-cms/archive/release/3.2.x.zip
2821
cms33: https://github.com/divio/django-cms/archive/release/3.3.x.zip
29-
cms34: https://github.com/divio/django-cms/archive/develop.zip
30-
py26: unittest2
31-
py26: django-filer<1.2
32-
py27: django-filer>=1.2
33-
py33: django-filer>=1.2
34-
py34: django-filer>=1.2
35-
py35: django-filer>=1.2
22+
cms34: https://github.com/divio/django-cms/archive/release/3.4.x.zip
3623
-r{toxinidir}/requirements-test.txt
3724

3825
[testenv:pep8]

0 commit comments

Comments
 (0)