Merge pull request #124 from nephila/feature/config_update

Config update
This commit is contained in:
Iacopo Spalletti 2015-06-28 19:10:57 +02:00
commit 453ca4b122
7 changed files with 59 additions and 55 deletions

View file

@ -1,32 +1,32 @@
# Config file for automatic testing at travis-ci.org # Config file for automatic testing at travis-ci.org
language: python language: python
python: python:
- 3.3 - 3.3
- 3.4 - 3.4
- 2.7 - 2.7
- 2.6 - 2.6
env: env:
matrix: matrix:
- DJANGO='django16' - DJANGO='django16'
- DJANGO='django17' - DJANGO='django17'
# command to install dependencies, e.g. pip install -r requirements.txt --use-mirrors # command to install dependencies, e.g. pip install -r requirements.txt --use-mirrors
install: install:
- pip install -U tox>=1.8 coveralls - pip install -U tox>=1.8 coveralls
- "if [[ $TRAVIS_PYTHON_VERSION == '2.6' ]]; then export PYVER=py26; fi" - "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 == '2.7' ]]; then export PYVER=py27; fi"
- "if [[ $TRAVIS_PYTHON_VERSION == '3.3' ]]; then export PYVER=py33; 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.4' ]]; then export PYVER=py34; fi"
# command to run tests, e.g. python setup.py test # command to run tests, e.g. python setup.py test
script: COMMAND='coverage run' tox -e"$PYVER-$DJANGO" script: COMMAND='coverage run' tox -e"$PYVER-$DJANGO"
after_success: coveralls after_success: coveralls
matrix: matrix:
exclude: exclude:
- python: 2.6 - python: 2.6
env: DJANGO='django17' env: DJANGO='django17'

View file

@ -3,6 +3,12 @@
History History
------- -------
0.5.0 (XXXX-XX-XX)
++++++++++++++++++
* Drop dependency on Django select2
* Code cleanups
0.4.0 (2015-03-22) 0.4.0 (2015-03-22)
++++++++++++++++++ ++++++++++++++++++

View file

@ -20,7 +20,6 @@ HELPER_SETTINGS = {
'easy_thumbnails', 'easy_thumbnails',
'djangocms_text_ckeditor', 'djangocms_text_ckeditor',
'cmsplugin_filer_image', 'cmsplugin_filer_image',
'django_select2',
'taggit_autosuggest', 'taggit_autosuggest',
], ],
'LANGUAGE_CODE': 'en', 'LANGUAGE_CODE': 'en',

View file

@ -1,18 +1,17 @@
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
from django import forms from django import forms
from django.conf import settings from django.conf import settings
import django_select2
from parler.forms import TranslatableModelForm from parler.forms import TranslatableModelForm
from taggit_autosuggest.widgets import TagAutoSuggest
from .models import Post from .models import Post
class LatestEntriesForm(forms.ModelForm): class LatestEntriesForm(forms.ModelForm):
class Meta: def __init__(self, *args, **kwargs):
widgets = { super(LatestEntriesForm, self).__init__(*args, **kwargs)
'tags': django_select2.Select2MultipleWidget self.fields['tags'].widget = TagAutoSuggest('taggit.Tag')
}
class Media: class Media:
css = { css = {

View file

@ -6,4 +6,4 @@ nose>=1.3.0
django-nose>=1.2 django-nose>=1.2
flake8 flake8
djangocms-helper>=0.7 djangocms-helper>=0.7
tox>=1.8 tox>=2.0

View file

@ -49,7 +49,6 @@ setup(
'cmsplugin-filer', 'cmsplugin-filer',
'django-meta>=0.2', 'django-meta>=0.2',
'django-meta-mixin>=0.1.1', 'django-meta-mixin>=0.1.1',
'django-select2>4.3',
], ],
license="BSD", license="BSD",
zip_safe=False, zip_safe=False,
@ -61,6 +60,9 @@ setup(
'Intended Audience :: Developers', 'Intended Audience :: Developers',
'License :: OSI Approved :: BSD License', 'License :: OSI Approved :: BSD License',
'Natural Language :: English', 'Natural Language :: English',
'Framework :: Django',
'Framework :: Django :: 1.6',
'Framework :: Django :: 1.7',
"Programming Language :: Python :: 2", "Programming Language :: Python :: 2",
'Programming Language :: Python :: 2.6', 'Programming Language :: Python :: 2.6',
'Programming Language :: Python :: 2.7', 'Programming Language :: Python :: 2.7',

10
tox.ini
View file

@ -1,17 +1,15 @@
[tox] [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] [testenv]
deps = deps =
html5lib < 0.9999 html5lib < 0.9999
django16: Django>=1.6,<1.7 django16: Django>=1.6,<1.7
django17: Django>=1.7,<1.8 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 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: unittest2
py26: django-select2
py27: django-select2
py33: django-select2-py3
py34: django-select2-py3
-r{toxinidir}/requirements-test.txt -r{toxinidir}/requirements-test.txt
commands = {env:COMMAND:python} setup.py test commands = {env:COMMAND:python} setup.py test