Commit 4123450e authored by Valentin Samir's avatar Valentin Samir

Add support for Django 2.0, fix #33

parent 4de2e2c1
Pipeline #621 failed with stage
in 0 seconds
...@@ -13,6 +13,7 @@ Unreleased ...@@ -13,6 +13,7 @@ Unreleased
Added Added
----- -----
* Support for python 3.6 and Django 1.11 * Support for python 3.6 and Django 1.11
* Support for Django 2.0
v0.9.0 - 2017-11-17 v0.9.0 - 2017-11-17
......
...@@ -12,7 +12,6 @@ ...@@ -12,7 +12,6 @@
"""Some util function for the app""" """Some util function for the app"""
from .default_settings import settings from .default_settings import settings
from django.core.urlresolvers import reverse
from django.http import HttpResponseRedirect, HttpResponse from django.http import HttpResponseRedirect, HttpResponse
from django.contrib import messages from django.contrib import messages
from django.contrib.messages import constants as DEFAULT_MESSAGE_LEVELS from django.contrib.messages import constants as DEFAULT_MESSAGE_LEVELS
...@@ -20,6 +19,10 @@ from django.core.serializers.json import DjangoJSONEncoder ...@@ -20,6 +19,10 @@ from django.core.serializers.json import DjangoJSONEncoder
from django.utils import timezone from django.utils import timezone
from django.core.exceptions import ValidationError from django.core.exceptions import ValidationError
from django.utils.translation import ugettext_lazy as _ from django.utils.translation import ugettext_lazy as _
try:
from django.urls import reverse
except ImportError:
from django.core.urlresolvers import reverse
import re import re
import random import random
......
...@@ -13,7 +13,6 @@ ...@@ -13,7 +13,6 @@
from .default_settings import settings, SessionStore from .default_settings import settings, SessionStore
from django.shortcuts import render, redirect from django.shortcuts import render, redirect
from django.core.urlresolvers import reverse
from django.http import HttpResponse, HttpResponseRedirect from django.http import HttpResponse, HttpResponseRedirect
from django.contrib import messages from django.contrib import messages
from django.utils.decorators import method_decorator from django.utils.decorators import method_decorator
...@@ -24,6 +23,10 @@ from django.middleware.csrf import CsrfViewMiddleware ...@@ -24,6 +23,10 @@ from django.middleware.csrf import CsrfViewMiddleware
from django.views.generic import View from django.views.generic import View
from django.utils.encoding import python_2_unicode_compatible from django.utils.encoding import python_2_unicode_compatible
from django.utils.safestring import mark_safe from django.utils.safestring import mark_safe
try:
from django.urls import reverse
except ImportError:
from django.core.urlresolvers import reverse
import re import re
import logging import logging
......
...@@ -36,6 +36,7 @@ if __name__ == '__main__': ...@@ -36,6 +36,7 @@ if __name__ == '__main__':
'Framework :: Django :: 1.9', 'Framework :: Django :: 1.9',
'Framework :: Django :: 1.10', 'Framework :: Django :: 1.10',
'Framework :: Django :: 1.11', 'Framework :: Django :: 1.11',
'Framework :: Django :: 2.0',
'Intended Audience :: Developers', 'Intended Audience :: Developers',
'Intended Audience :: System Administrators', 'Intended Audience :: System Administrators',
'License :: OSI Approved :: GNU General Public License v3 (GPLv3)', 'License :: OSI Approved :: GNU General Public License v3 (GPLv3)',
...@@ -61,7 +62,7 @@ if __name__ == '__main__': ...@@ -61,7 +62,7 @@ if __name__ == '__main__':
}, },
keywords=['django', 'cas', 'cas3', 'server', 'sso', 'single sign-on', 'authentication', 'auth'], keywords=['django', 'cas', 'cas3', 'server', 'sso', 'single sign-on', 'authentication', 'auth'],
install_requires=[ install_requires=[
'Django >= 1.7,<1.12', 'requests >= 2.4', 'requests_futures >= 0.9.5', 'Django >= 1.7,<2.1', 'requests >= 2.4', 'requests_futures >= 0.9.5',
'lxml >= 3.4', 'six >= 1' 'lxml >= 3.4', 'six >= 1'
], ],
url="https://github.com/nitmir/django-cas-server", url="https://github.com/nitmir/django-cas-server",
......
...@@ -12,6 +12,7 @@ envlist= ...@@ -12,6 +12,7 @@ envlist=
py35-django110, py35-django110,
py35-django111, py35-django111,
py36-django111, py36-django111,
py36-django20,
[flake8] [flake8]
max-line-length=100 max-line-length=100
...@@ -97,6 +98,12 @@ deps = ...@@ -97,6 +98,12 @@ deps =
Django>=1.11,<1.12 Django>=1.11,<1.12
{[base]deps} {[base]deps}
[testenv:py36-django20]
basepython=python3.6
deps =
Django>=2.0,<2.1
{[base]deps}
[testenv:flake8] [testenv:flake8]
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment