From 16c87cad61942861266e7b238f748a0f410ad747 Mon Sep 17 00:00:00 2001 From: Iacopo Spalletti Date: Sun, 28 Jun 2015 11:38:16 +0200 Subject: [PATCH 1/4] Add supported Django versions classifiers --- setup.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/setup.py b/setup.py index 986db3f..38220cc 100755 --- a/setup.py +++ b/setup.py @@ -61,6 +61,9 @@ setup( 'Intended Audience :: Developers', 'License :: OSI Approved :: BSD License', 'Natural Language :: English', + 'Framework :: Django', + 'Framework :: Django :: 1.6', + 'Framework :: Django :: 1.7', "Programming Language :: Python :: 2", 'Programming Language :: Python :: 2.6', 'Programming Language :: Python :: 2.7', From 8a0fcf87c6b811b3c4bf9b50e710ce46213c67ce Mon Sep 17 00:00:00 2001 From: Iacopo Spalletti Date: Sun, 28 Jun 2015 17:36:02 +0200 Subject: [PATCH 2/4] Update travis configuration --- .travis.yml | 82 +++++++++++++++++++++---------------------- requirements-test.txt | 2 +- 2 files changed, 42 insertions(+), 42 deletions(-) diff --git a/.travis.yml b/.travis.yml index 8cfccdb..08247f1 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,46 +1,46 @@ -# Config file for automatic testing at travis-ci.org + # Config file for automatic testing at travis-ci.org -language: python + language: python -python: - - 3.3 - - 3.4 - - 2.7 - - 2.6 + python: + - 3.3 + - 3.4 + - 2.7 + - 2.6 + + env: + matrix: + - DJANGO='django16' + - DJANGO='django17' + + # 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" + + # command to run tests, e.g. python setup.py test + script: COMMAND='coverage run' tox -e"$PYVER-$DJANGO" + + after_success: coveralls -env: matrix: - - DJANGO='django16' - - DJANGO='django17' + exclude: + - python: 2.6 + env: DJANGO='django17' -# 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" - -# command to run tests, e.g. python setup.py test -script: COMMAND='coverage run' tox -e"$PYVER-$DJANGO" - -after_success: coveralls - -matrix: - exclude: - - python: 2.6 - env: DJANGO='django17' - - allow_failures: - - python: 3.3 - env: DJANGO='django15' - - python: 3.3 - env: DJANGO='django16' - - python: 3.3 - env: DJANGO='django17' - - python: 3.4 - env: DJANGO='django15' - - python: 3.4 - env: DJANGO='django16' - - python: 3.4 - env: DJANGO='django17' + allow_failures: + - python: 3.3 + env: DJANGO='django15' + - python: 3.3 + env: DJANGO='django16' + - python: 3.3 + env: DJANGO='django17' + - python: 3.4 + env: DJANGO='django15' + - python: 3.4 + env: DJANGO='django16' + - python: 3.4 + env: DJANGO='django17' diff --git a/requirements-test.txt b/requirements-test.txt index 87bbd05..ef1af62 100644 --- a/requirements-test.txt +++ b/requirements-test.txt @@ -6,4 +6,4 @@ nose>=1.3.0 django-nose>=1.2 flake8 djangocms-helper>=0.7 -tox>=1.8 +tox>=2.0 From e5413ff6fc7671120e4875eb78d7011e05990612 Mon Sep 17 00:00:00 2001 From: Iacopo Spalletti Date: Sun, 28 Jun 2015 18:34:33 +0200 Subject: [PATCH 3/4] Drop depedency on django select2 --- cms_helper.py | 1 - djangocms_blog/forms.py | 9 ++++----- setup.py | 1 - tox.ini | 10 ++++------ 4 files changed, 8 insertions(+), 13 deletions(-) diff --git a/cms_helper.py b/cms_helper.py index b928473..4f77738 100755 --- a/cms_helper.py +++ b/cms_helper.py @@ -20,7 +20,6 @@ HELPER_SETTINGS = { 'easy_thumbnails', 'djangocms_text_ckeditor', 'cmsplugin_filer_image', - 'django_select2', 'taggit_autosuggest', ], 'LANGUAGE_CODE': 'en', diff --git a/djangocms_blog/forms.py b/djangocms_blog/forms.py index a9de9e0..edbac6d 100644 --- a/djangocms_blog/forms.py +++ b/djangocms_blog/forms.py @@ -1,18 +1,17 @@ # -*- coding: utf-8 -*- from django import forms from django.conf import settings -import django_select2 from parler.forms import TranslatableModelForm +from taggit_autosuggest.widgets import TagAutoSuggest from .models import Post class LatestEntriesForm(forms.ModelForm): - class Meta: - widgets = { - 'tags': django_select2.Select2MultipleWidget - } + def __init__(self, *args, **kwargs): + super(LatestEntriesForm, self).__init__(*args, **kwargs) + self.fields['tags'].widget = TagAutoSuggest('taggit.Tag') class Media: css = { diff --git a/setup.py b/setup.py index 38220cc..1b62f97 100755 --- a/setup.py +++ b/setup.py @@ -49,7 +49,6 @@ setup( 'cmsplugin-filer', 'django-meta>=0.2', 'django-meta-mixin>=0.1.1', - 'django-select2>4.3', ], license="BSD", zip_safe=False, diff --git a/tox.ini b/tox.ini index 3cfa7c4..7fd99ea 100644 --- a/tox.ini +++ b/tox.ini @@ -1,17 +1,15 @@ [tox] -envlist = py{26}-django{16}-cms{30,31},py{27,33,34}-django{16,17}-cms{30,31} +envlist = py{26}-django{16}-cms{30,31},py{27,33,34}-django{16,17,18}-cms{30,31} [testenv] deps = html5lib < 0.9999 django16: Django>=1.6,<1.7 django17: Django>=1.7,<1.8 + django18: Django>=1.7,<1.9 cms30: https://github.com/divio/django-cms/archive/support/3.0.x.zip - cms31: https://github.com/divio/django-cms/archive/develop.zip + cms31: https://github.com/divio/django-cms/archive/support/3.1.x.zip + cms32: https://github.com/divio/django-cms/archive/develop.zip py26: unittest2 - py26: django-select2 - py27: django-select2 - py33: django-select2-py3 - py34: django-select2-py3 -r{toxinidir}/requirements-test.txt commands = {env:COMMAND:python} setup.py test From 674106cd9fa082efce7e336b428d657602a3144b Mon Sep 17 00:00:00 2001 From: Iacopo Spalletti Date: Sun, 28 Jun 2015 18:42:41 +0200 Subject: [PATCH 4/4] Update changelog --- HISTORY.rst | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/HISTORY.rst b/HISTORY.rst index d8db42f..38b7f41 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -3,6 +3,12 @@ History ------- +0.5.0 (XXXX-XX-XX) +++++++++++++++++++ + +* Drop dependency on Django select2 +* Code cleanups + 0.4.0 (2015-03-22) ++++++++++++++++++