aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbmedx <bmesick@edx.org>2017-09-13 12:02:47 -0400
committerbmedx <bmesick@edx.org>2017-09-13 12:02:47 -0400
commit7f1ba504894a58ca2a3849d3f577e9467fa5689e (patch)
tree28f7285de2ff30962206707980916159257225fb
parent8b210641f9f75fc923e531bc093687ab18901f34 (diff)
Adding Django 1.11 support
-rw-r--r--django_openid_auth/views.py4
-rw-r--r--example_consumer/settings.py2
-rw-r--r--tox.ini6
3 files changed, 6 insertions, 6 deletions
diff --git a/django_openid_auth/views.py b/django_openid_auth/views.py
index fdadc23..87ecfb8 100644
--- a/django_openid_auth/views.py
+++ b/django_openid_auth/views.py
@@ -133,7 +133,7 @@ def default_render_failure(request, message, status=403,
template_name='openid/failure.html',
exception=None):
"""Render an error page to the user."""
- context = RequestContext(request)
+ context = RequestContext(request).flatten()
context.update(dict(message=message, exception=exception))
data = render_to_string(template_name, context)
return HttpResponse(data, status=status)
@@ -179,7 +179,7 @@ def login_begin(request, template_name='openid/login.html',
# Invalid or no form data:
if openid_url is None:
- context = RequestContext(request)
+ context = RequestContext(request).flatten()
context.update({
'form': login_form,
redirect_field_name: redirect_to,
diff --git a/example_consumer/settings.py b/example_consumer/settings.py
index e19e2b3..a739c22 100644
--- a/example_consumer/settings.py
+++ b/example_consumer/settings.py
@@ -53,13 +53,13 @@ SECRET_KEY = '34958734985734985734985798437'
# SECURITY WARNING: don't run with debug turned on in production!
DEBUG = True
-TEMPLATE_DEBUG = True
TEMPLATES = [
{
'BACKEND': 'django.template.backends.django.DjangoTemplates',
'DIRS': [],
'APP_DIRS': True,
'OPTIONS': {
+ 'debug': True,
'context_processors': [
'django.contrib.auth.context_processors.auth',
'django.template.context_processors.debug',
diff --git a/tox.ini b/tox.ini
index d980d1b..6bd3c2f 100644
--- a/tox.ini
+++ b/tox.ini
@@ -1,7 +1,7 @@
[tox]
envlist =
- py27-django{1.8,1.9,1.10}
- # py3-django{1.11}
+ py27-django{1.8,1.9,1.10,1.11}
+ py3-django{1.11}
[testenv]
commands = python manage.py test django_openid_auth
@@ -15,7 +15,7 @@ deps =
{[testenv]deps}
[testenv:py3]
-basepython = python3
+basepython = python3.5
deps =
python3-openid
{[testenv]deps}