Skip to content

Commit

Permalink
Merge pull request #27 from edx/jawayria/django32_support
Browse files Browse the repository at this point in the history
feat: Added support for Django3.2
  • Loading branch information
Jawayria authored Sep 30, 2021
2 parents cb19c87 + e51582c commit 698be53
Show file tree
Hide file tree
Showing 5 changed files with 29 additions and 21 deletions.
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ env:
- TOX_ENV=django22
- TOX_ENV=django30
- TOX_ENV=django31
- TOX_ENV=django32
before_install:
- export BOTO_CONFIG=/dev/null
- pip install pip==20.0.2
Expand Down
2 changes: 1 addition & 1 deletion imagemodal/mixins/scenario.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ def _read_file(file_path):
"""
Read in a file's contents
"""
with open(file_path) as file_input:
with open(file_path, encoding='utf-8') as file_input:
file_contents = file_input.read()
return file_contents

Expand Down
1 change: 1 addition & 0 deletions imagemodal/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,4 @@
'imagemodal/translations',
]
SECRET_KEY = 'SECRET_KEY'
DEFAULT_AUTO_FIELD = 'django.db.models.AutoField'
7 changes: 6 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
from setuptools import setup


version = '2.0.0'
version = '2.1.0'
description = __doc__.strip().split('\n')[0]
this_directory = path.abspath(path.dirname(__file__))
with open(path.join(this_directory, 'README.rst')) as file_in:
Expand Down Expand Up @@ -76,6 +76,11 @@ def is_requirement(line):
'Programming Language :: Python :: 3.8',
'Topic :: Education',
'Topic :: Internet :: WWW/HTTP',
'Framework :: Django',
'Framework :: Django :: 2.2',
'Framework :: Django :: 3.0',
'Framework :: Django :: 3.1',
'Framework :: Django :: 3.2',
],
test_suite='imagemodal.tests',
)
39 changes: 20 additions & 19 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,53 +1,54 @@
[tox]
envlist = csslint,eslint,py38-django{22,30,31},quality
envlist = csslint,eslint,py38-django{22,30,31,32},quality

[testenv]
deps =
django22: Django>=2.2,<2.3
django30: Django>=3.0,<3.1
django31: Django>=3.1,<3.2
-rrequirements/test.txt
django22: Django>=2.2,<2.3
django30: Django>=3.0,<3.1
django31: Django>=3.1,<3.2
django32: Django>=3.2,<4.0
-rrequirements/test.txt
commands =
coverage run manage.py test
coverage report
coverage html
coverage run manage.py test
coverage report
coverage html

[testenv:clean]
commands =
coverage erase
coverage erase
deps =
-rrequirements/test.txt
-rrequirements/test.txt
skip_install = True

[testenv:csslint]
whitelist_externals = {toxinidir}/node_modules/csslint/dist/cli.js
passenv = TRAVIS TRAVIS_JOB_ID TRAVIS_BRANCH
commands =
make requirements_js
{toxinidir}/node_modules/csslint/dist/cli.js imagemodal/public/
make requirements_js
{toxinidir}/node_modules/csslint/dist/cli.js imagemodal/public/
deps =
skip_install = True

[testenv:eslint]
whitelist_externals = {toxinidir}/node_modules/eslint/bin/eslint.js
passenv = TRAVIS TRAVIS_JOB_ID TRAVIS_BRANCH
commands =
make requirements_js
{toxinidir}/node_modules/eslint/bin/eslint.js --fix imagemodal/public/view.js
make requirements_js
{toxinidir}/node_modules/eslint/bin/eslint.js --fix imagemodal/public/view.js
deps =
skip_install = True

[testenv:quality]
passenv = TRAVIS TRAVIS_JOB_ID TRAVIS_BRANCH
deps =
-rrequirements/quality.txt
-rrequirements/quality.txt
commands =
pycodestyle imagemodal/
pylint imagemodal/
pycodestyle imagemodal/
pylint imagemodal/

[testenv:transifex]
deps =
transifex-client
transifex-client
commands =
tx push -s
tx push -s

0 comments on commit 698be53

Please sign in to comment.