Skip to content

Commit

Permalink
Drop support for Django 1.7
Browse files Browse the repository at this point in the history
  • Loading branch information
Becky Smith committed Sep 4, 2018
1 parent 0d1e94a commit 8fe3b8d
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 27 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@
Release Notes
=============

1.6.0
-----
* Fix KeyError from _get_site_by_id
* Drop support for Django 1.7

1.5.0
-----
* Support Django 2.0 (PR #47 and #60)
Expand Down
2 changes: 1 addition & 1 deletion multisite/__version__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = '1.5.0'
__version__ = '1.6.0'
20 changes: 3 additions & 17 deletions multisite/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -1048,21 +1048,11 @@ class TemplateLoaderTests(TestCase):

def test_get_template_multisite_default_dir(self):
template = get_template("test.html")
if django.VERSION < (1, 8): # <1.7 render() requires Context instance
from django.template.context import Context
self.assertEqual(template.render(context=Context()), "Test!")
else:
self.assertEqual(template.render(), "Test!")
self.assertEqual(template.render(), "Test!")

def test_domain_template(self):
template = get_template("example.html")
if django.VERSION < (1, 8): # <1.7 render() requires Context instance
from django.template.context import Context
self.assertEqual(
template.render(context=Context()), "Test example.com template"
)
else:
self.assertEqual(template.render(), "Test example.com template")
self.assertEqual(template.render(), "Test example.com template")

def test_get_template_old_settings(self):
# tests that we can still get to the template filesystem loader with
Expand All @@ -1085,11 +1075,7 @@ def test_get_template_old_settings(self):
]
):
template = get_template("test.html")
if django.VERSION < (1, 8): # <1.7 render() requires Context instance
from django.template.context import Context
self.assertEqual(template.render(context=Context()), "Test!")
else:
self.assertEqual(template.render(), "Test!")
self.assertEqual(template.render(), "Test!")


class UpdatePublicSuffixListCommandTestCase(TestCase):
Expand Down
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@


if sys.version_info < (3, 4):
install_requires = ['Django>=1.7,<2.0', 'tldextract>=1.2']
install_requires = ['Django>=1.8,<2.0', 'tldextract>=1.2']
else:
install_requires = ['Django>=1.7,<2.1', 'tldextract>=1.2']
install_requires = ['Django>=1.8,<2.1', 'tldextract>=1.2']


def long_description():
Expand Down
13 changes: 6 additions & 7 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ setenv=
PYTHONPATH = {toxinidir}:{env:PYTHONPATH:}
usedevelop = True
envlist =
py36-django{2.0, 1.11}
py35-django{2.0, 1.11,1.10,1.9,1.8}
py34-django{2.0, 1.11,1.10,1.9,1.8,1.7}
py27-django{1.11,1.10,1.9,1.8,1.7}
py36-django{2.1,2.0,1.11}
py35-django{2.1,2.0,1.11,1.10,1.9,1.8}
py34-django{2.0,1.11,1.10,1.9,1.8}
py27-django{1.11,1.10,1.9,1.8}

[testenv]
commands = pytest --cov --cov-config .coveragerc --pyargs multisite
Expand All @@ -20,13 +20,12 @@ deps =
pytest
pytest-cov
pytest-pythonpath
pytest-django

py27: mock
django2.0,django1.11,django1.10,django1.9,django1.8: pytest-django
django2.1: Django>=2.1,<2.2
django2.0: Django>=2.0,<2.1
django1.11: Django>=1.11,<2.0
django1.10: Django>=1.10,<1.11
django1.9: Django>=1.9,<1.10
django1.8: Django>=1.8,<1.9
django1.7: pytest-django<3.2.0
django1.7: Django>=1.7,<1.8

0 comments on commit 8fe3b8d

Please sign in to comment.