-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Django 2.1 support #32
base: develop
Are you sure you want to change the base?
Changes from 7 commits
7d00dfa
10611c9
ada03c9
b52bcf5
e8c2bae
2299547
bb54655
4452b5f
81e2b9e
e407e09
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,39 @@ | ||
language: python | ||
|
||
matrix: | ||
include: | ||
- python: 2.7 | ||
env: | ||
- TOXENV=django19-py27 | ||
- TOXENV=django110-py27 | ||
- TOXENV=django111-py27 | ||
- python: 3.6 | ||
env: | ||
- TOXENV=django19-py36 | ||
- TOXENV=django110-py36 | ||
- TOXENV=django111-py36 | ||
include: | ||
- python: 2.7 | ||
env: TOXENV=django111-py27 | ||
- python: 3.5 | ||
env: TOXENV=django111-py35 | ||
- python: 3.5 | ||
env: TOXENV=django20-py35 | ||
- python: 3.5 | ||
env: TOXENV=django21-py35 | ||
- python: 3.6 | ||
env: TOXENV=django111-py36 | ||
- python: 3.6 | ||
env: TOXENV=django20-py36 | ||
- python: 3.6 | ||
env: TOXENV=django21-py36 | ||
- python: 3.7 | ||
dist: xenial | ||
sudo: true | ||
env: TOXENV=django111-py37 | ||
- python: 3.7 | ||
dist: xenial | ||
sudo: true | ||
env: TOXENV=django20-py37 | ||
- python: 3.7 | ||
dist: xenial | ||
sudo: true | ||
env: TOXENV=django21-py37 | ||
|
||
install: | ||
- pip install tox | ||
- pip install coveralls | ||
script: | ||
- tox | ||
|
||
script: tox | ||
|
||
after_success: | ||
- coveralls | ||
- coveralls |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
Django~=1.11.15 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. These requirements can be listed directly in the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. See https://github.com/praekelt/django-object-tools/blob/develop/tox.ini as an example |
||
django-object-tools==1.9 |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
Django>=2.0,<2.1 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. See comment above about requirements |
||
django-object-tools==2.0 |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
Django>=2.1,<2.2 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. See comment above about requirements |
||
django-object-tools==2.0 |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
DEBUG = True | ||
USE_TZ = True | ||
|
||
DATABASE_ENGINE = 'sqlite3' | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
USE_TZ = True | ||
|
||
DATABASE_ENGINE = 'sqlite3' | ||
|
||
DATABASES = { | ||
'default': { | ||
'ENGINE': 'django.db.backends.sqlite3', | ||
'NAME': ':memory:', | ||
} | ||
} | ||
|
||
SECRET_KEY = '123' | ||
|
||
INSTALLED_APPS = [ | ||
'django.contrib.auth', | ||
'django.contrib.admin', | ||
'django.contrib.contenttypes', | ||
'django.contrib.sessions', | ||
'object_tools', | ||
'export' | ||
] | ||
|
||
SERIALIZATION_MODULES = { | ||
'csv': 'export.serializers.csv_serializer' | ||
} | ||
|
||
EMAIL_BACKEND = 'django.core.mail.backends.dummy.EmailBackend' | ||
|
||
ROOT_URLCONF = 'object_tools.tests.urls' | ||
STATIC_URL = '/static/' | ||
|
||
TEMPLATES = [ | ||
{ | ||
"BACKEND": "django.template.backends.django.DjangoTemplates", | ||
"DIRS": [ | ||
], | ||
"OPTIONS": { | ||
"context_processors": [ | ||
"django.contrib.auth.context_processors.auth", | ||
"django.template.context_processors.debug", | ||
"django.template.context_processors.i18n", | ||
"django.template.context_processors.media", | ||
"django.template.context_processors.static", | ||
"django.template.context_processors.tz", | ||
"django.template.context_processors.request", | ||
"django.contrib.messages.context_processors.messages", | ||
], | ||
"loaders": [ | ||
"django.template.loaders.filesystem.Loader", | ||
"django.template.loaders.app_directories.Loader", | ||
] | ||
}, | ||
}, | ||
] | ||
|
||
MIDDLEWARE = ( | ||
"django.middleware.common.CommonMiddleware", | ||
"django.contrib.sessions.middleware.SessionMiddleware", | ||
"django.middleware.csrf.CsrfViewMiddleware", | ||
"django.contrib.auth.middleware.AuthenticationMiddleware", | ||
"django.contrib.messages.middleware.MessageMiddleware" | ||
) |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
USE_TZ = True | ||
|
||
DATABASE_ENGINE = 'sqlite3' | ||
|
||
DATABASES = { | ||
'default': { | ||
'ENGINE': 'django.db.backends.sqlite3', | ||
'NAME': ':memory:', | ||
} | ||
} | ||
|
||
SECRET_KEY = '123' | ||
|
||
INSTALLED_APPS = [ | ||
'django.contrib.auth', | ||
'django.contrib.admin', | ||
'django.contrib.contenttypes', | ||
'django.contrib.sessions', | ||
'object_tools', | ||
'export' | ||
] | ||
|
||
SERIALIZATION_MODULES = { | ||
'csv': 'export.serializers.csv_serializer' | ||
} | ||
|
||
EMAIL_BACKEND = 'django.core.mail.backends.dummy.EmailBackend' | ||
|
||
ROOT_URLCONF = 'object_tools.tests.urls' | ||
STATIC_URL = '/static/' | ||
|
||
TEMPLATES = [ | ||
{ | ||
"BACKEND": "django.template.backends.django.DjangoTemplates", | ||
"DIRS": [ | ||
], | ||
"OPTIONS": { | ||
"context_processors": [ | ||
"django.contrib.auth.context_processors.auth", | ||
"django.template.context_processors.debug", | ||
"django.template.context_processors.i18n", | ||
"django.template.context_processors.media", | ||
"django.template.context_processors.static", | ||
"django.template.context_processors.tz", | ||
"django.template.context_processors.request", | ||
"django.contrib.messages.context_processors.messages", | ||
], | ||
"loaders": [ | ||
"django.template.loaders.filesystem.Loader", | ||
"django.template.loaders.app_directories.Loader", | ||
] | ||
}, | ||
}, | ||
] | ||
|
||
MIDDLEWARE = ( | ||
"django.middleware.common.CommonMiddleware", | ||
"django.contrib.sessions.middleware.SessionMiddleware", | ||
"django.middleware.csrf.CsrfViewMiddleware", | ||
"django.contrib.auth.middleware.AuthenticationMiddleware", | ||
"django.contrib.messages.middleware.MessageMiddleware" | ||
) |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -101,4 +101,5 @@ def view(self, request, extra_context=None, process_form=True): | |
context, | ||
) | ||
|
||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. PEP 8: expected 2 blank lines after class or function definition, found 1 |
||
object_tools.tools.register(Export) |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,23 +9,32 @@ | |
author_email='[email protected]', | ||
url='http://github.com/praekelt/django-export', | ||
packages=find_packages(), | ||
include_package_data=True, | ||
install_requires=[ | ||
'django-object-tools', | ||
'pyyaml>=3.11' | ||
'django-object-tools>=2.0' | ||
], | ||
tests_require=[ | ||
'django-setuptest>=0.1', | ||
'django-object-tools>=2.0', | ||
'tox' | ||
], | ||
include_package_data=True, | ||
test_suite="setuptest.setuptest.SetupTestSuite", | ||
test_suite="tox", | ||
classifiers=[ | ||
"Programming Language :: Python", | ||
"License :: OSI Approved :: BSD License", | ||
"Development Status :: 4 - Beta", | ||
"Operating System :: OS Independent", | ||
"Framework :: Django", | ||
"Framework :: Django :: 1.11", | ||
"Framework :: Django :: 2.0", | ||
"Framework :: Django :: 2.1", | ||
"Intended Audience :: Developers", | ||
"Topic :: Internet :: WWW/HTTP :: Dynamic Content", | ||
"Programming Language :: Python", | ||
"Programming Language :: Python :: 2.7", | ||
"Programming Language :: Python :: 3", | ||
"Programming Language :: Python :: 3.4", | ||
"Programming Language :: Python :: 3.5", | ||
"Programming Language :: Python :: 3.6", | ||
"Programming Language :: Python :: 3.7", | ||
], | ||
zip_safe=False, | ||
) |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,18 @@ | ||
[tox] | ||
envlist = | ||
django111-{py27,py36}, | ||
django110-{py27,py36}, | ||
django19-{py27,py36}, | ||
django111-py27 | ||
{django111,django20,django21}-{py35,py36,py37} | ||
|
||
[testenv] | ||
commands = | ||
coverage run manage.py test export.tests --settings=test_settings | ||
coverage report -m | ||
coverage run manage.py test | ||
deps = | ||
coverage | ||
django111: django>=1.11,<2.0 | ||
django110: django>=1.10,<1.11 | ||
django19: django>=1.9,<1.10 | ||
django20: django>=2.0,<2.1 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Seeing that you have these here, all the requirements files for the tests can be removed |
||
django21: django>=2.1,<2.2 | ||
|
||
setenv = | ||
django111: DJANGO_SETTINGS_MODULE=export.tests.settings.111 | ||
django20: DJANGO_SETTINGS_MODULE=export.tests.settings.20 | ||
django21: DJANGO_SETTINGS_MODULE=export.tests.settings.21 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
List these envs the same way please. No need for the separation the be this granular.