Skip to content

Commit

Permalink
Add support for Django 1.10. Drop older versions.
Browse files Browse the repository at this point in the history
  • Loading branch information
yakky committed Dec 4, 2016
1 parent ecb0a14 commit 8a500fb
Show file tree
Hide file tree
Showing 15 changed files with 89 additions and 271 deletions.
65 changes: 11 additions & 54 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,31 +7,25 @@ sudo: false
python:
- 3.5
- 3.4
- 3.3
- 2.7
- 2.6

env:
matrix:
- DJANGO='django16' CMS='cms30'
- DJANGO='django16' CMS='cms31'
- DJANGO='django17' CMS='cms30'
- DJANGO='django17' CMS='cms31'
- DJANGO='django17' CMS='cms32'
- DJANGO='django18' CMS='cms31'
- DJANGO='django18' CMS='cms33'
- TOXENV='pep8'
- TOXENV='docs'
- TOXENV='isort'
- DJANGO='django18' CMS='cms32'
- DJANGO='django18' CMS='cms33'
- DJANGO='django18' CMS='cms34'
- DJANGO='django19' CMS='cms32'
- DJANGO='django19' CMS='cms33'
- TOXENV='pep8'
- TOXENV='isort'
- DJANGO='django19' CMS='cms34'
- DJANGO='django110' CMS='cms34'

# command to install dependencies, e.g. pip install -r requirements.txt --use-mirrors
install:
- pip install -U tox>=1.8 coveralls
- "if [[ $TRAVIS_PYTHON_VERSION == '2.6' ]]; then export PYVER=py26; fi"
- "if [[ $TRAVIS_PYTHON_VERSION == '2.7' ]]; then export PYVER=py27; fi"
- "if [[ $TRAVIS_PYTHON_VERSION == '3.3' ]]; then export PYVER=py33; fi"
- "if [[ $TRAVIS_PYTHON_VERSION == '3.4' ]]; then export PYVER=py34; fi"
- "if [[ $TRAVIS_PYTHON_VERSION == '3.5' ]]; then export PYVER=py35; fi"
- "if [[ ${DJANGO}z != 'z' ]]; then export TOXENV=$PYVER-$DJANGO-$CMS; fi"
Expand All @@ -47,52 +41,15 @@ after_success:

matrix:
exclude:
- python: 2.6
env: TOXENV='pep8'
- python: 2.6
env: TOXENV='isort'
- python: 2.7
env: TOXENV='pep8'
- python: 2.7
env: TOXENV='isort'
- python: 3.3
env: TOXENV='pep8'
- python: 3.3
env: TOXENV='isort'
- python: 2.7
env: TOXENV='docs'
- python: 3.4
env: TOXENV='pep8'
- python: 3.4
env: TOXENV='isort'
- python: 2.6
env: DJANGO='django17' CMS='cms30'
- python: 2.6
env: DJANGO='django17' CMS='cms31'
- python: 2.6
env: DJANGO='django17' CMS='cms32'
- python: 2.6
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='django19' CMS='cms32'
- python: 2.6
env: DJANGO='django19' CMS='cms33'
- python: 3.3
env: DJANGO='django19' CMS='cms32'
- python: 3.3
env: DJANGO='django19' CMS='cms33'
- python: 3.5
env: DJANGO='django16' CMS='cms30'
- python: 3.5
env: DJANGO='django16' CMS='cms31'
- python: 3.5
env: DJANGO='django16' CMS='cms32'
- python: 3.5
env: DJANGO='django17' CMS='cms30'
- python: 3.5
env: DJANGO='django17' CMS='cms31'
- python: 3.5
env: DJANGO='django17' CMS='cms32'

- python: 3.4
env: TOXENV='docs'
8 changes: 8 additions & 0 deletions HISTORY.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,14 @@
History
*******

0.5.0 (unreleased)
==================

* Add Django 1.10 support
* Add support for django CMS 3.4, 3.4
* Drop Django 1.7 and below
* Drop django CMS 3.1 and below

0.4.2 (2016-01-08)
==================

Expand Down
9 changes: 9 additions & 0 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,15 @@ djangocms-page-tags

Tagged pages for django CMS 3

Python: 2.7, 3.4, 3.5

Django: 1.8 to 1.10

django CMS: 3.2 to 3.4

.. warning:: Since version 0.5, the support for Python 2.6, Python 3.3, Django<1.8 and django CMS<3.2
has been dropped

**********
Quickstart
**********
Expand Down
2 changes: 1 addition & 1 deletion djangocms_page_tags/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# -*- coding: utf-8 -*-
from __future__ import absolute_import, print_function, unicode_literals

__version__ = '0.4.2.post1'
__version__ = '0.5.dev1'
__author__ = 'Iacopo Spalletti <[email protected]>'
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,23 @@
from __future__ import absolute_import, print_function, unicode_literals

from cms.api import get_page_draft
from cms.cms_toolbars import PAGE_MENU_SECOND_BREAK
from cms.toolbar.items import Break
from cms.toolbar_base import CMSToolbar
from cms.toolbar_pool import toolbar_pool
from cms.utils import get_cms_setting
from cms.utils.i18n import get_language_list, get_language_object
from cms.utils.permissions import has_page_change_permission
from django.core.urlresolvers import NoReverseMatch, reverse
from django.utils.translation import ugettext_lazy as _

from .models import PageTags, TitleTags

try:
from cms.cms_toolbars import PAGE_MENU_SECOND_BREAK
from cms.utils.permissions import has_page_permission
has_page_change_permission = None
except ImportError:
from cms.cms_toolbar import PAGE_MENU_SECOND_BREAK
from cms.utils.permissions import has_page_change_permission


PAGE_TAGS_MENU_TITLE = _('Tags')
PAGE_TAGS_ITEM_TITLE = _('Common')
Expand All @@ -34,14 +36,23 @@ def populate(self):

# check global permissions if CMS_PERMISSIONS is active
if get_cms_setting('PERMISSION'):
has_global_current_page_change_permission = has_page_change_permission(self.request)
if not has_page_change_permission:
has_global_current_page_change_permission = has_page_permission(
self.request.user, self.request.current_page, 'change'
)
else:
has_global_current_page_change_permission = has_page_change_permission(
self.request
)
else:
has_global_current_page_change_permission = False
# check if user has page edit permission
can_change = (
self.request.current_page and
self.request.current_page.has_change_permission(self.request)
)
if not has_page_change_permission:
can_change = (self.request.current_page and
self.request.current_page.has_change_permission(self.request.user))
else:
can_change = (self.request.current_page and
self.request.current_page.has_change_permission(self.request))
if has_global_current_page_change_permission or can_change:
not_edit_mode = not self.toolbar.edit_mode
tags_menu = self.toolbar.get_or_create_menu('page')
Expand Down
78 changes: 0 additions & 78 deletions djangocms_page_tags/south_migrations/0001_initial.py

This file was deleted.

99 changes: 0 additions & 99 deletions djangocms_page_tags/south_migrations/0002_auto__add_titletags.py

This file was deleted.

Empty file.
Loading

0 comments on commit 8a500fb

Please sign in to comment.