From f87fca3588b2710b8461ffa0f758104137630d9d Mon Sep 17 00:00:00 2001 From: Yohan Boniface Date: Mon, 9 Jan 2017 10:13:21 +0100 Subject: [PATCH] Bump to new social-auth cf https://github.com/omab/python-social-auth/blob/master/MIGRATING_TO_SOCIAL.md --- requirements.txt | 3 ++- umap/settings/base.py | 26 +++++++++++++------------- umap/urls.py | 2 +- 3 files changed, 16 insertions(+), 15 deletions(-) diff --git a/requirements.txt b/requirements.txt index 3cfc2a3c..801a3bf5 100644 --- a/requirements.txt +++ b/requirements.txt @@ -3,5 +3,6 @@ django-compressor==2.1 django-leaflet-storage==0.8.0rc13 Pillow==4.0.0 psycopg2==2.6.2 -python-social-auth==0.2.21 requests==2.12.4 +social-auth-app-django==0.1.0 +social-auth-core==0.2.1 diff --git a/umap/settings/base.py b/umap/settings/base.py index 41551474..f755f9ba 100644 --- a/umap/settings/base.py +++ b/umap/settings/base.py @@ -59,7 +59,7 @@ INSTALLED_APPS = ( 'leaflet_storage', 'umap', 'compressor', - 'social.apps.django_app.default', + 'social_django', ) # ============================================================================= @@ -118,8 +118,8 @@ TEMPLATES = [ 'django.template.context_processors.media', 'django.template.context_processors.static', 'django.template.context_processors.tz', - 'social.apps.django_app.context_processors.backends', - 'social.apps.django_app.context_processors.login_redirect', + 'social_django.context_processors.backends', + 'social_django.context_processors.login_redirect', 'umap.context_processors.settings', 'umap.context_processors.version', ) @@ -180,14 +180,14 @@ SOCIAL_AUTH_ASSOCIATE_BY_EMAIL = True LOGIN_URL = "login" SOCIAL_AUTH_LOGIN_REDIRECT_URL = "/login/popup/end/" SOCIAL_AUTH_PIPELINE = ( - 'social.pipeline.social_auth.social_details', - 'social.pipeline.social_auth.social_uid', - 'social.pipeline.social_auth.auth_allowed', - 'social.pipeline.social_auth.social_user', - 'social.pipeline.social_auth.associate_by_email', - 'social.pipeline.user.get_username', - 'social.pipeline.user.create_user', - 'social.pipeline.social_auth.associate_user', - 'social.pipeline.social_auth.load_extra_data', - 'social.pipeline.user.user_details' + 'social_core.pipeline.social_auth.social_details', + 'social_core.pipeline.social_auth.social_uid', + 'social_core.pipeline.social_auth.auth_allowed', + 'social_core.pipeline.social_auth.social_user', + 'social_core.pipeline.social_auth.associate_by_email', + 'social_core.pipeline.user.get_username', + 'social_core.pipeline.user.create_user', + 'social_core.pipeline.social_auth.associate_user', + 'social_core.pipeline.social_auth.load_extra_data', + 'social_core.pipeline.user.user_details' ) diff --git a/umap/urls.py b/umap/urls.py index 322c124f..5bcb6d85 100644 --- a/umap/urls.py +++ b/umap/urls.py @@ -15,7 +15,7 @@ admin.autodiscover() urlpatterns = [ url(r'^admin/', include(admin.site.urls)), - url('', include('social.apps.django_app.urls', namespace='social')), + url('', include('social_django.urls', namespace='social')), url(r'^m/(?P\d+)/$', MapShortUrl.as_view(), name='umap_short_url'), url(r'^ajax-proxy/$', cache_page(180)(views.ajax_proxy), name='ajax-proxy'),