[Python-modules-commits] [python-social-auth] 176/322: update for django 1.9
Wolfgang Borgert
debacle at moszumanska.debian.org
Sat Dec 24 15:13:05 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 b51629fcc54ad755f1b17f27712aacc860f34129
Author: DanielJDufour <daniel.j.dufour at gmail.com>
Date: Thu Mar 12 20:47:26 2015 -0400
update for django 1.9
---
social/apps/django_app/__init__.py | 7 -------
social/apps/django_app/default/config.py | 7 +++++++
social/strategies/django_strategy.py | 3 ---
3 files changed, 7 insertions(+), 10 deletions(-)
diff --git a/social/apps/django_app/__init__.py b/social/apps/django_app/__init__.py
index 5225a4f..6ed7e2c 100644
--- a/social/apps/django_app/__init__.py
+++ b/social/apps/django_app/__init__.py
@@ -10,10 +10,3 @@ To use this:
SOCIAL_AUTH_STRATEGY = 'social.strategies.django_strategy.DjangoStrategy'
SOCIAL_AUTH_STORAGE = 'social.apps.django_app.default.models.DjangoStorage'
"""
-from social.strategies.utils import set_current_strategy_getter
-from social.apps.django_app.utils import load_strategy
-
-
-# Set strategy loader method to workaround current strategy getter needed on
-# get_user() method on authentication backends when working with Django
-set_current_strategy_getter(load_strategy)
diff --git a/social/apps/django_app/default/config.py b/social/apps/django_app/default/config.py
index 977cd3c..9658c57 100644
--- a/social/apps/django_app/default/config.py
+++ b/social/apps/django_app/default/config.py
@@ -4,3 +4,10 @@ from django.apps import AppConfig
class PythonSocialAuthConfig(AppConfig):
name = 'social.apps.django_app.default'
verbose_name = 'Python Social Auth'
+
+ def ready(self):
+ from social.strategies.utils import set_current_strategy_getter
+ from social.apps.django_app.utils import load_strategy
+ set_current_strategy_getter(load_strategy)
+
+
diff --git a/social/strategies/django_strategy.py b/social/strategies/django_strategy.py
index d0c4390..0f48368 100644
--- a/social/strategies/django_strategy.py
+++ b/social/strategies/django_strategy.py
@@ -5,7 +5,6 @@ from django.contrib.contenttypes.models import ContentType
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.translation import get_language
from social.strategies.base import BaseStrategy, BaseTemplateStrategy
@@ -106,8 +105,6 @@ class DjangoStrategy(BaseStrategy):
'pk': val.pk,
'ctype': ContentType.objects.get_for_model(val).pk
}
- if isinstance(val, MergeDict):
- val = dict(val)
return val
def from_session_value(self, val):
--
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