From f54ccfab75c0c7df2975ff0623a6d542248cd121 Mon Sep 17 00:00:00 2001 From: ankan17 Date: Thu, 25 May 2017 13:45:33 +0530 Subject: [PATCH] Upgrade to Django 1.11 Alongwith Django 1.11, python-social-auth and Pillow have been upgraded. Fixes #108. --- festcms/settings.py.example | 35 ++++++++++++++++++++--------------- festflow/urls.py | 2 +- requirements.txt | 21 ++++++++++++++++----- 3 files changed, 37 insertions(+), 21 deletions(-) diff --git a/festcms/settings.py.example b/festcms/settings.py.example index b5acb6d..cbb8576 100644 --- a/festcms/settings.py.example +++ b/festcms/settings.py.example @@ -41,7 +41,7 @@ INSTALLED_APPS = ( 'django.contrib.sessions', 'django.contrib.messages', 'django.contrib.staticfiles', - 'social.apps.django_app.default', + 'social_django', 'festflow', 'ckeditor', 'ckeditor_uploader', @@ -73,8 +73,8 @@ TEMPLATES = [ 'django.template.context_processors.request', 'django.contrib.auth.context_processors.auth', 'django.contrib.messages.context_processors.messages', - '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', ], }, }, @@ -158,23 +158,24 @@ SOCIAL_AUTH_PIPELINE = ( # format to create the user instance later. On some cases the details are # already part of the auth response from the provider, but sometimes this # could hit a provider API. - 'social.pipeline.social_auth.social_details', + 'social_core.pipeline.social_auth.social_details', # Get the social uid from whichever service we're authing thru. The uid is # the unique identifier of the given user in the provider. - 'social.pipeline.social_auth.social_uid', + 'social_core.pipeline.social_auth.social_uid', # Verifies that the current auth process is valid within the current # project, this is were emails and domains whitelists are applied (if # defined). - 'social.pipeline.social_auth.auth_allowed', + # Did not find it in python-social-auth + #'social.pipeline.social_auth.auth_allowed', # Checks if the current social-account is already associated in the site. - 'social.pipeline.social_auth.social_user', + 'social_core.pipeline.social_auth.social_user', # Make up a username for this person, appends a random string at the end if # there's any collision. - 'social.pipeline.user.get_username', + 'social_core.pipeline.user.get_username', # Send a validation email to the user to verify its email address. # Disabled by default. @@ -182,28 +183,32 @@ SOCIAL_AUTH_PIPELINE = ( # Associates the current social details with another user account with # a similar email address. Disabled by default. - 'social.pipeline.social_auth.associate_by_email', + 'social_core.pipeline.social_auth.associate_by_email', # Create a user account if we haven't found one yet. - 'social.pipeline.user.create_user', + 'social_core.pipeline.user.create_user', # Create the record that associated the social account with this user. - 'social.pipeline.social_auth.associate_user', + 'social_core.pipeline.social_auth.associate_user', # Populate the extra_data field in the social record with the values # specified by settings (and the default ones like access_token, etc). - 'social.pipeline.social_auth.load_extra_data', + 'social_core.pipeline.social_auth.load_extra_data', # Update the user record with any changed info from the auth service. - 'social.pipeline.user.user_details', + 'social_core.pipeline.user.user_details', # Fillup profile data (CUSTOM PIPELINE) 'festflow.pipeline.save_profile', ) AUTHENTICATION_BACKENDS = ( - 'social.backends.google.GoogleOAuth2', - 'social.backends.facebook.Facebook2OAuth2', + 'social_core.backends.open_id.OpenIdAuth', + 'social_core.backends.google.GoogleOpenId', + 'social_core.backends.google.GoogleOAuth2', + 'social_core.backends.google.GoogleOAuth', + 'social_core.backends.twitter.TwitterOAuth', + 'social_core.backends.yahoo.YahooOpenId', 'django.contrib.auth.backends.ModelBackend', ) diff --git a/festflow/urls.py b/festflow/urls.py index 0ba2e4f..044d403 100644 --- a/festflow/urls.py +++ b/festflow/urls.py @@ -46,7 +46,7 @@ url(r'^login/$', views.login_page, name='login_page'), # social login urls - url('', include('social.apps.django_app.urls', namespace='social')), + url('', include('social_django.urls', namespace='social')), # Form to complete profile url(r'^complete_profile/$', diff --git a/requirements.txt b/requirements.txt index 02a5f3d..b39fe9e 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,12 +1,23 @@ +appdirs==1.4.3 defusedxml==0.5.0 -Django==1.8 +Django==1.11 +django-ckeditor==5.1.1 +django-email-extras==0.3.3 +django-forms-builder==0.13.0 +future==0.15.0 oauthlib==1.1.2 -Pillow==3.3.1 +olefile==0.44 +packaging==16.8 +Pillow==4.0.0 PyJWT==1.4.2 -python-social-auth==0.2.21 +pyparsing==2.2.0 +python-gnupg==0.4.0 python3-openid==3.0.10 +pytz==2017.2 requests==2.11.1 requests-oauthlib==0.6.2 six==1.10.0 -django-ckeditor==5.1.1 -django-forms-builder==0.13.0 +social-auth-app-django==1.2.0 +social-auth-core==1.3.0 +sphinx-me==0.3 +Unidecode==0.4.20