Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade to Django 1.11 #126

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 20 additions & 15 deletions festcms/settings.py.example
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down Expand Up @@ -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',
],
},
},
Expand Down Expand Up @@ -158,52 +158,57 @@ 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.
# 'social.pipeline.mail.mail_validation',

# 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',
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why so many of these? Please remove the unnecessary ones. We only need google and facebook for now.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does having extra of these affect performance?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ankan17 no but we must have clarity on why we need these. This might confuse us in future. Please remove the Twitter etc.

'django.contrib.auth.backends.ModelBackend',
)

Expand Down
2 changes: 1 addition & 1 deletion festflow/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -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/$',
Expand Down
21 changes: 16 additions & 5 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -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
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why are these dependencies required?

oauthlib==1.1.2
Pillow==3.3.1
olefile==0.44
packaging==16.8
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

really we need these?

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
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why this?

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
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

and why this?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ankan17 and why these new requirements? sphinx?

Unidecode==0.4.20
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This too