[Python-modules-commits] [python-social-auth] 61/322: Fix #460: Call force_text on _URL settings to support reverse_lazy with default session serializer
Wolfgang Borgert
debacle at moszumanska.debian.org
Sat Dec 24 15:12:49 UTC 2016
This is an automated email from the git hooks/post-receive script.
debacle pushed a commit to tag v0.2.10
in repository python-social-auth.
commit fc949b7dd578daa0902106e6dfbc51f4f6ee7072
Author: Frankie Robertson <frankie at robertson.name>
Date: Fri Dec 19 16:39:22 2014 +0200
Fix #460: Call force_text on _URL settings to support reverse_lazy with default session serializer
---
social/strategies/django_strategy.py | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/social/strategies/django_strategy.py b/social/strategies/django_strategy.py
index 6cc4365..c738dd5 100644
--- a/social/strategies/django_strategy.py
+++ b/social/strategies/django_strategy.py
@@ -6,6 +6,7 @@ from django.contrib.auth import authenticate
from django.shortcuts import redirect
from django.template import TemplateDoesNotExist, RequestContext, loader
from django.utils.datastructures import MergeDict
+from django.utils.encoding import force_text
from django.utils.translation import get_language
from social.strategies.base import BaseStrategy, BaseTemplateStrategy
@@ -30,7 +31,10 @@ class DjangoStrategy(BaseStrategy):
super(DjangoStrategy, self).__init__(storage, tpl)
def get_setting(self, name):
- return getattr(settings, name)
+ value = getattr(settings, name)
+ if name.endswith('_URL'):
+ value = force_text(value)
+ return value
def request_data(self, merge=True):
if not self.request:
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/python-modules/packages/python-social-auth.git
More information about the Python-modules-commits
mailing list