Commit 7f1ba504 by bmedx

Adding Django 1.11 support

parent 8b210641
...@@ -133,7 +133,7 @@ def default_render_failure(request, message, status=403, ...@@ -133,7 +133,7 @@ def default_render_failure(request, message, status=403,
template_name='openid/failure.html', template_name='openid/failure.html',
exception=None): exception=None):
"""Render an error page to the user.""" """Render an error page to the user."""
context = RequestContext(request) context = RequestContext(request).flatten()
context.update(dict(message=message, exception=exception)) context.update(dict(message=message, exception=exception))
data = render_to_string(template_name, context) data = render_to_string(template_name, context)
return HttpResponse(data, status=status) return HttpResponse(data, status=status)
...@@ -179,7 +179,7 @@ def login_begin(request, template_name='openid/login.html', ...@@ -179,7 +179,7 @@ def login_begin(request, template_name='openid/login.html',
# Invalid or no form data: # Invalid or no form data:
if openid_url is None: if openid_url is None:
context = RequestContext(request) context = RequestContext(request).flatten()
context.update({ context.update({
'form': login_form, 'form': login_form,
redirect_field_name: redirect_to, redirect_field_name: redirect_to,
......
...@@ -53,13 +53,13 @@ SECRET_KEY = '34958734985734985734985798437' ...@@ -53,13 +53,13 @@ SECRET_KEY = '34958734985734985734985798437'
# SECURITY WARNING: don't run with debug turned on in production! # SECURITY WARNING: don't run with debug turned on in production!
DEBUG = True DEBUG = True
TEMPLATE_DEBUG = True
TEMPLATES = [ TEMPLATES = [
{ {
'BACKEND': 'django.template.backends.django.DjangoTemplates', 'BACKEND': 'django.template.backends.django.DjangoTemplates',
'DIRS': [], 'DIRS': [],
'APP_DIRS': True, 'APP_DIRS': True,
'OPTIONS': { 'OPTIONS': {
'debug': True,
'context_processors': [ 'context_processors': [
'django.contrib.auth.context_processors.auth', 'django.contrib.auth.context_processors.auth',
'django.template.context_processors.debug', 'django.template.context_processors.debug',
......
[tox] [tox]
envlist = envlist =
py27-django{1.8,1.9,1.10} py27-django{1.8,1.9,1.10,1.11}
# py3-django{1.11} py3-django{1.11}
[testenv] [testenv]
commands = python manage.py test django_openid_auth commands = python manage.py test django_openid_auth
...@@ -15,7 +15,7 @@ deps = ...@@ -15,7 +15,7 @@ deps =
{[testenv]deps} {[testenv]deps}
[testenv:py3] [testenv:py3]
basepython = python3 basepython = python3.5
deps = deps =
python3-openid python3-openid
{[testenv]deps} {[testenv]deps}
......
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