From b136779b0056594143ebc686b633e1c9517ab12c Mon Sep 17 00:00:00 2001 From: komalsheth286 Date: Thu, 6 Oct 2016 15:22:34 +0530 Subject: Fetching email id using facebook login --- scipy2016/settings.py | 4 ++++ website/forms.py | 5 ----- website/templates/cfp.html | 34 ++++++++++++++++++++-------------- 3 files changed, 24 insertions(+), 19 deletions(-) diff --git a/scipy2016/settings.py b/scipy2016/settings.py index 1c0ef19..9295dcb 100755 --- a/scipy2016/settings.py +++ b/scipy2016/settings.py @@ -115,6 +115,10 @@ SOCIAL_AUTH_GOOGLE_OAUTH2_SECRET = GOOGLE_SECRET SOCIAL_AUTH_FACEBOOK_KEY = FACEBOOK_KEY SOCIAL_AUTH_FACEBOOK_SECRET = FACEBOOK_SECRET +SOCIAL_AUTH_FACEBOOK_SCOPE = ['email'] +SOCIAL_AUTH_FACEBOOK_PROFILE_EXTRA_PARAMS = { + 'fields': 'id,name,email', +} LOCAL_SOCIAL_AUTH_GITHUB_KEY = GITHUB_KEY diff --git a/website/forms.py b/website/forms.py index c8e4846..392d6e2 100755 --- a/website/forms.py +++ b/website/forms.py @@ -97,11 +97,6 @@ class ProposalForm(forms.ModelForm): model = Proposal exclude = ('user', 'email','prerequisite','status','rate') - def clean_title(self): - title = self.cleaned_data['title'] - if Proposal.objects.filter(title=title).exists(): - raise forms.ValidationError("This title already exist.") - return title def clean_attachment(self): import os diff --git a/website/templates/cfp.html b/website/templates/cfp.html index 9c8f3dc..dfc2bb9 100755 --- a/website/templates/cfp.html +++ b/website/templates/cfp.html @@ -45,7 +45,7 @@
- {% if proposal_submit %} + {% if proposal_submit %}
@@ -55,17 +55,23 @@
- {% endif %} + {% endif %} + + + {% if registration_complete %}

Thank You for your registration. You can now log in by clicking here !



- {% endif %} + {% endif %} + + + {% if user and not user.is_anonymous and not login_required %} -

We invite you to submit proposals for talks/ workshops to be presented at SciPy 2016. The time duration for talks is 15 or 30 minutes and for workshops is 2 to 4 hours. The workshops are to be conducted in two parallel tracks for basic and advanced users. -

+

We invite you to submit proposals for talks/ workshops to be presented at SciPy 2016. The time duration for talks is 15 or 30 minutes and for workshops is 2 to 4 hours. The workshops are to be conducted in two parallel tracks for basic and advanced users. +

Important Dates


- {% if user.is_superuser %} + {% if user.is_superuser %}
View Proposals
{% else %}
@@ -84,11 +90,11 @@
{% endif %} - {% else %} -

We invite you to submit proposals for talks/ workshops to be presented at SciPy 2016. The time duration for talks is 15 or 30 minutes and for workshops is 2 to 4 hours. The workshops are to be conducted in two parallel tracks for basic and advanced users. -


-
-- cgit