Add Django 1.9/1.10 and Wagtail 1.9 to tests and requirements
This commit is contained in:
committed by
Michael van Tellingen
parent
821ee5863e
commit
bc91d64770
17
.travis.yml
17
.travis.yml
@@ -4,6 +4,23 @@ language: python
|
||||
|
||||
matrix:
|
||||
include:
|
||||
# Django 1.9, Wagtail 1.9
|
||||
- python: 2.7
|
||||
env: TOXENV=py27-django19-wagtail19
|
||||
- python: 3.5
|
||||
env: TOXENV=py35-django19-wagtail19
|
||||
- python: 3.6
|
||||
env: TOXENV=py36-django19-wagtail19
|
||||
|
||||
# Django 1.10, Wagtail 1.10
|
||||
- python: 2.7
|
||||
env: TOXENV=py27-django110-wagtail110
|
||||
- python: 3.5
|
||||
env: TOXENV=py35-django110-wagtail110
|
||||
- python: 3.6
|
||||
env: TOXENV=py36-django110-wagtail110
|
||||
|
||||
# Django 1.11, Wagtail 1.10
|
||||
- python: 2.7
|
||||
env: TOXENV=py27-django111-wagtail110
|
||||
- python: 3.5
|
||||
|
@@ -35,7 +35,7 @@ in the admin interface.
|
||||
|
||||
Instructions
|
||||
------------
|
||||
Wagtail Personalisation requires Wagtail 1.10 and Django 1.11.
|
||||
Wagtail Personalisation requires Wagtail 1.9 or 1.10 and Django 1.9, 1.10 or 1.11.
|
||||
|
||||
To install the package with pip::
|
||||
|
||||
|
4
setup.py
4
setup.py
@@ -3,7 +3,7 @@ from setuptools import find_packages, setup
|
||||
|
||||
|
||||
install_requires = [
|
||||
'wagtail>=1.10,<1.11',
|
||||
'wagtail>=1.9,<1.11',
|
||||
'user-agents>=1.0.1',
|
||||
'wagtailfontawesome>=1.0.6',
|
||||
]
|
||||
@@ -61,6 +61,8 @@ setup(
|
||||
'Programming Language :: Python :: 3.5',
|
||||
'Programming Language :: Python :: 3.6',
|
||||
'Framework :: Django',
|
||||
'Framework :: Django :: 1.9',
|
||||
'Framework :: Django :: 1.10',
|
||||
'Framework :: Django :: 1.11',
|
||||
'Topic :: Internet :: WWW/HTTP :: Site Management',
|
||||
],
|
||||
|
@@ -1,6 +1,10 @@
|
||||
from __future__ import absolute_import, unicode_literals
|
||||
|
||||
import os
|
||||
from pkg_resources import parse_version as V
|
||||
|
||||
import django
|
||||
|
||||
|
||||
DATABASES = {
|
||||
'default': {
|
||||
@@ -52,7 +56,8 @@ TEMPLATES = [
|
||||
},
|
||||
]
|
||||
|
||||
MIDDLEWARE = (
|
||||
def get_middleware_settings():
|
||||
return (
|
||||
'django.middleware.common.CommonMiddleware',
|
||||
'django.contrib.sessions.middleware.SessionMiddleware',
|
||||
'django.middleware.csrf.CsrfViewMiddleware',
|
||||
@@ -64,6 +69,12 @@ MIDDLEWARE = (
|
||||
'wagtail.wagtailcore.middleware.SiteMiddleware',
|
||||
)
|
||||
|
||||
# Django 1.10 started to use "MIDDLEWARE" instead of "MIDDLEWARE_CLASSES".
|
||||
if V(django.get_version()) < V('1.10'):
|
||||
MIDDLEWARE_CLASSES = get_middleware_settings()
|
||||
else:
|
||||
MIDDLEWARE = get_middleware_settings()
|
||||
|
||||
INSTALLED_APPS = (
|
||||
'wagtail_personalisation',
|
||||
|
||||
|
@@ -14,7 +14,7 @@ class Migration(migrations.Migration):
|
||||
initial = True
|
||||
|
||||
dependencies = [
|
||||
('wagtailcore', '0033_remove_golive_expiry_help_text'),
|
||||
('wagtailcore', '0001_initial'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
|
@@ -10,7 +10,7 @@ import wagtail.wagtailcore.fields
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('wagtailcore', '0033_remove_golive_expiry_help_text'),
|
||||
('wagtailcore', '0001_initial'),
|
||||
('pages', '0001_initial'),
|
||||
]
|
||||
|
||||
|
5
tox.ini
5
tox.ini
@@ -1,11 +1,14 @@
|
||||
[tox]
|
||||
envlist = py{27,35,36}-django{111}-wagtail{110},lint
|
||||
envlist = py{27,35,36}-django{19,110,111}-wagtail{19,110},lint
|
||||
|
||||
[testenv]
|
||||
commands = coverage run --parallel -m pytest {posargs}
|
||||
extras = test
|
||||
deps =
|
||||
django19: django>=1.9,<1.10
|
||||
django110: django>=1.10<1.11
|
||||
django111: django>=1.11,<1.12
|
||||
wagtail19: wagtail>=1.9,<1.10
|
||||
wagtail110: wagtail>=1.10,<1.11
|
||||
|
||||
[testenv:coverage-report]
|
||||
|
Reference in New Issue
Block a user