Skip to content

Commit

Permalink
Dropped Django 1.7 support
Browse files Browse the repository at this point in the history
  • Loading branch information
brosner committed Dec 11, 2015
1 parent 531d8e3 commit 6fdb016
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 30 deletions.
3 changes: 0 additions & 3 deletions .travis.yml
Expand Up @@ -6,7 +6,6 @@ python:
- "3.4"
- "3.5"
env:
- DJANGO=1.7
- DJANGO=1.8
- DJANGO=1.9
- DJANGO=master
Expand All @@ -16,8 +15,6 @@ matrix:
env: DJANGO=1.9
- python: "3.3"
env: DJANGO=master
- python: "3.5"
env: DJANGO=1.7
install:
- pip install tox coveralls
script:
Expand Down
2 changes: 1 addition & 1 deletion README.rst
Expand Up @@ -57,7 +57,7 @@ Features
Requirements
--------------

* Django 1.7, 1.8 or 1.9
* Django 1.8 or 1.9
* Python 2.7, 3.3, 3.4 or 3.5
* django-appconf (included in ``install_requires``)
* pytz (included in ``install_requires``)
Expand Down
3 changes: 0 additions & 3 deletions account/languages.py
Expand Up @@ -9,9 +9,6 @@
# for code, lang in settings.LANGUAGES
# ]
#
# List is stored here instead of getting it on runtime because
# there was changes in that list between Django version 1.7 and 1.8.
# This in turn causes Django 1.7 to think that there is unmigrated changes

LANGUAGES = [
("af", "Afrikaans"),
Expand Down
15 changes: 0 additions & 15 deletions account/tests/test_views.py
Expand Up @@ -113,9 +113,6 @@ def test_post_next_url(self):
self.assertRedirects(response, next_url, fetch_redirect_response=False)

def test_session_next_url(self):
# session setup due to bug in Django 1.7
setup_session(self.client)

next_url = "/next-url/"
session = self.client.session
session["redirect_to"] = next_url
Expand Down Expand Up @@ -261,15 +258,3 @@ def test_post_authenticated_success_no_mail(self):
fetch_redirect_response=False
)
self.assertEqual(len(mail.outbox), 0)


def setup_session(client):
assert apps.is_installed("django.contrib.sessions"), "sessions not installed"
engine = import_module(settings.SESSION_ENGINE)
cookie = client.cookies.get(settings.SESSION_COOKIE_NAME, None)
if cookie:
return engine.SessionStore(cookie.value)
s = engine.SessionStore()
s.save()
client.cookies[settings.SESSION_COOKIE_NAME] = s.session_key
return s
5 changes: 2 additions & 3 deletions docs/installation.rst
Expand Up @@ -45,9 +45,8 @@ Add ``account.middleware.LocaleMiddleware`` and
...
]

Once everything is in place make sure you run ``syncdb`` (Django 1.4 and 1.6)
or ``migrate`` (Django 1.7) to modify the database with the ``account`` app
models.
Once everything is in place make sure you run ``migrate`` to modify the
database with the ``account`` app models.

.. _dependencies:

Expand Down
9 changes: 4 additions & 5 deletions tox.ini
Expand Up @@ -6,18 +6,17 @@ exclude = account/migrations/*,docs/*

[tox]
envlist =
py27-{1.7,1.8,1.9,master},
py32-{1.7,1.8},
py33-{1.7,1.8},
py34-{1.7,1.8,1.9,master},
py27-{1.8,1.9,master},
py32-{1.8},
py33-{1.8},
py34-{1.8,1.9,master},
py35-{1.8,1.9,master}

[testenv]
deps =
py{27,33,34,35}: coverage==4.0.2
py32: coverage==3.7.1
flake8==2.5.0
1.7: Django>=1.7,<1.8
1.8: Django>=1.8,<1.9
1.9: Django>=1.9,<1.10
master: https://github.com/django/django/tarball/master
Expand Down

0 comments on commit 6fdb016

Please sign in to comment.