Django 1.9 compatibility

This commit is contained in:
Valentin Samir 2015-12-12 13:51:59 +01:00
parent 90e077dedb
commit b69769d71a
6 changed files with 21 additions and 4 deletions

View File

@ -7,8 +7,10 @@ env:
matrix: matrix:
- TOX_ENV=py27-django17 - TOX_ENV=py27-django17
- TOX_ENV=py27-django18 - TOX_ENV=py27-django18
- TOX_ENV=py27-django19
- TOX_ENV=py34-django17 - TOX_ENV=py34-django17
- TOX_ENV=py34-django18 - TOX_ENV=py34-django18
- TOX_ENV=py34-django19
- TOX_ENV=flake8 - TOX_ENV=flake8
cache: cache:
directories: directories:

View File

@ -22,6 +22,7 @@ Quick start
INSTALLED_APPS = ( INSTALLED_APPS = (
... ...
'bootstrap3',
'cas_server', 'cas_server',
) )

View File

@ -38,7 +38,7 @@ class User(models.Model):
unique_together = ("username", "session_key") unique_together = ("username", "session_key")
session_key = models.CharField(max_length=40, blank=True, null=True) session_key = models.CharField(max_length=40, blank=True, null=True)
username = models.CharField(max_length=30) username = models.CharField(max_length=30)
date = models.DateTimeField(auto_now_add=True, auto_now=True) date = models.DateTimeField(auto_now=True)
@classmethod @classmethod
def clean_old_entries(cls): def clean_old_entries(cls):

View File

@ -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.utils.importlib import import_module
from django.core.urlresolvers import reverse 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
@ -20,6 +19,7 @@ from django.contrib import messages
import random import random
import string import string
import json import json
from importlib import import_module
try: try:
from urlparse import urlparse, urlunparse, parse_qsl from urlparse import urlparse, urlunparse, parse_qsl

View File

@ -9,7 +9,7 @@ os.chdir(os.path.normpath(os.path.join(os.path.abspath(__file__), os.pardir)))
setup( setup(
name='django-cas-server', name='django-cas-server',
version='0.2.1', version='0.3',
packages=['cas_server'], packages=['cas_server'],
include_package_data=True, include_package_data=True,
license='GPLv3', license='GPLv3',
@ -37,7 +37,7 @@ setup(
] ]
}, },
keywords=['django', 'cas', 'cas3', 'server', 'sso', 'single sign-on', 'authentication', 'auth'], keywords=['django', 'cas', 'cas3', 'server', 'sso', 'single sign-on', 'authentication', 'auth'],
install_requires=['Django >= 1.7', 'requests >= 2.4', 'requests_futures >= 0.9.5', install_requires=['Django >= 1.7,<1.10', 'requests >= 2.4', 'requests_futures >= 0.9.5',
'django-picklefield >= 0.3.1', 'django-bootstrap3 >= 5.4', 'lxml >= 3.4'], 'django-picklefield >= 0.3.1', 'django-bootstrap3 >= 5.4', 'lxml >= 3.4'],
url="https://github.com/nitmir/django-cas-server", url="https://github.com/nitmir/django-cas-server",
download_url="https://github.com/nitmir/django-cas-server/releases", download_url="https://github.com/nitmir/django-cas-server/releases",

14
tox.ini
View File

@ -2,8 +2,10 @@
envlist= envlist=
py27-django17, py27-django17,
py27-django18, py27-django18,
py27-django19,
py34-django17, py34-django17,
py34-django18, py34-django18,
py34-django19,
flake8, flake8,
[flake8] [flake8]
@ -29,6 +31,12 @@ deps =
Django>=1.8,<1.9 Django>=1.8,<1.9
{[base]deps} {[base]deps}
[testenv:py27-django19]
basepython=python2.7
deps =
Django>=1.9,<1.10
{[base]deps}
[testenv:py34-django17] [testenv:py34-django17]
basepython=python3.4 basepython=python3.4
deps = deps =
@ -41,6 +49,12 @@ deps =
Django>=1.8,<1.9 Django>=1.8,<1.9
{[base]deps} {[base]deps}
[testenv:py34-django19]
basepython=python3.4
deps =
Django>=1.9,<1.10
{[base]deps}
[testenv:flake8] [testenv:flake8]
basepython=python basepython=python
deps=flake8 deps=flake8