From e5ab06db0b960f73bc86203944377528d645533c Mon Sep 17 00:00:00 2001 From: komalsheth286 Date: Tue, 4 Oct 2016 14:37:08 +0530 Subject: Forgot password API --- scipy2016/settings.py | 18 +++++++++--------- scipy2016/urls.py | 12 ++++++------ website/forms.py | 4 ++-- website/templates/base.html | 4 ++-- website/templates/cfp.html | 2 +- website/templates/comment-abstract.html | 2 +- website/templates/register/password_reset_form.html | 3 ++- website/templates/submit-cfw.html | 2 +- website/templates/view-abstracts.html | 5 ++++- website/views.py | 10 ++++------ 10 files changed, 32 insertions(+), 30 deletions(-) diff --git a/scipy2016/settings.py b/scipy2016/settings.py index 01cedf0..1c0ef19 100755 --- a/scipy2016/settings.py +++ b/scipy2016/settings.py @@ -133,7 +133,7 @@ RECAPTCHA_PRIVATE_KEY = RECAPTCHA_PRIVATE LANGUAGE_CODE = 'en-us' -TIME_ZONE = 'UTC' +TIME_ZONE = 'Asia/Calcutta' USE_I18N = True @@ -148,16 +148,16 @@ USE_TZ = True STATIC_URL = '/static/' MEDIA_ROOT = os.path.join(BASE_DIR, 'uploads') -MEDIA_URL = "/downloads/" +MEDIA_URL = "/2016/downloads/" LOGIN_REDIRECT_URL = '/cfp' # smtp -# ACCOUNT_ACTIVATION_DAYS = 7 -# EMAIL_HOST = 'localhost' -# EMAIL_PORT = 1025 -# EMAIL_HOST_USER = '' -# EMAIL_HOST_PASSWORD = '' -# EMAIL_USE_TLS = False -# DEFAULT_FROM_EMAIL = 'komal@gmail.com' \ No newline at end of file +ACCOUNT_ACTIVATION_DAYS = 7 +EMAIL_HOST = 'localhost' +EMAIL_PORT = 1025 +EMAIL_HOST_USER = '' +EMAIL_HOST_PASSWORD = '' +EMAIL_USE_TLS = False +DEFAULT_FROM_EMAIL = 'komal@gmail.com' \ No newline at end of file diff --git a/scipy2016/urls.py b/scipy2016/urls.py index 5878a44..56c899b 100755 --- a/scipy2016/urls.py +++ b/scipy2016/urls.py @@ -14,15 +14,15 @@ urlpatterns = patterns('', url(r'^', include('social.apps.django_app.urls', namespace='social')), url(r'^', include('django.contrib.auth.urls', namespace='auth')), - url(r'^forgotpassword/$', password_reset, {'template_name': 'register/password_reset_form.html'}, name="password_reset"), - url(r'^password_reset/(?P[0-9A-Za-z]+)-(?P.+)/$', + url(r'^2016/forgotpassword/$', password_reset, {'template_name': 'register/password_reset_form.html'}, name="password_reset"), + url(r'^2016/password_reset/(?P[0-9A-Za-z]+)-(?P.+)/$', password_reset_confirm, {'template_name': 'register/password_reset_confirm.html'}, name='password_reset_confirm'), - url(r'^password_reset/mail_sent/$', password_reset_done, {'template_name': 'register/password_reset_done.html'}, + url(r'^2016/password_reset/mail_sent/$', password_reset_done, {'template_name': 'register/password_reset_done.html'}, name='password_reset_done'), - url(r'^password_reset/complete/$', password_reset_complete, {'template_name': 'register/password_reset_complete.html'}, + url(r'^2016/password_reset/complete/$', password_reset_complete, {'template_name': 'register/password_reset_complete.html'}, name='password_reset_complete'), - url(r'^changepassword/$', password_change, {'template_name': 'register/password_change_form.html'}, + url(r'^2016/changepassword/$', password_change, {'template_name': 'register/password_change_form.html'}, name='password_change'), - url(r'^password_change/done/$', password_change_done, {'template_name': 'register/password_change_done.html'}, + url(r'^2016/password_change/done/$', password_change_done, {'template_name': 'register/password_change_done.html'}, name='password_change_done'), ) diff --git a/website/forms.py b/website/forms.py index 4ea983e..180fead 100755 --- a/website/forms.py +++ b/website/forms.py @@ -149,7 +149,7 @@ class WorkshopForm(forms.ModelForm): duration = forms.ChoiceField(choices=ws_duration, label = 'Duration (Hrs.)') - tags = forms.ChoiceField(choices=MY_CHOICES) + tags = forms.ChoiceField(choices=MY_CHOICES, label = 'Lavel') class Meta: model = Proposal @@ -203,7 +203,7 @@ class UserRegisterForm(UserCreationForm): password2 = forms.CharField(widget=forms.PasswordInput(attrs={'placeholder': 'Confirm Password'}), required = True, error_messages = {'required':'Password Confirm field required.'}, - label = 'RePassword' + label = 'Re-enter Password' ) def clean_first_name(self): diff --git a/website/templates/base.html b/website/templates/base.html index fd20174..fb3d745 100755 --- a/website/templates/base.html +++ b/website/templates/base.html @@ -428,7 +428,7 @@ Visit SciPy.in/ - 2009/ + 2009/ 2010/ 2011/ 2012/ @@ -441,7 +441,7 @@
Creative Commons License
-
This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.
+
This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.

diff --git a/website/templates/cfp.html b/website/templates/cfp.html index e0eb537..8886937 100755 --- a/website/templates/cfp.html +++ b/website/templates/cfp.html @@ -101,7 +101,7 @@ {{ form.as_p }}

Create an Account - Forgot Password? + Forgot Password? {% csrf_token %} diff --git a/website/templates/comment-abstract.html b/website/templates/comment-abstract.html index 3bb6824..eb540f7 100755 --- a/website/templates/comment-abstract.html +++ b/website/templates/comment-abstract.html @@ -89,7 +89,7 @@ {% for rate in rates %}
{{rate.rating}}/10 - by {{ rate.user.first_name }} {{ rate.user.last_name }} + by - {{ rate.user }}
{% endfor %} diff --git a/website/templates/register/password_reset_form.html b/website/templates/register/password_reset_form.html index d2ac4f8..3075735 100755 --- a/website/templates/register/password_reset_form.html +++ b/website/templates/register/password_reset_form.html @@ -50,7 +50,8 @@ Kindly enter your email ID used for registration. The password reset link will b
{% csrf_token %} {{ form.email.errors }} -

{{ form.email }}

+

{{ form.email }} +

diff --git a/website/templates/submit-cfw.html b/website/templates/submit-cfw.html index f5dbc77..cae6d34 100755 --- a/website/templates/submit-cfw.html +++ b/website/templates/submit-cfw.html @@ -51,7 +51,7 @@
-{% if proposals_w > 1 %} You have exceeded the abstract submission limit. +{% if proposals_w > 1 %} You have exceeded the workshop proposal submission limit. You may view your submitted proposals by clicking here
diff --git a/website/templates/view-abstracts.html b/website/templates/view-abstracts.html index c1f6968..4933244 100755 --- a/website/templates/view-abstracts.html +++ b/website/templates/view-abstracts.html @@ -107,7 +107,10 @@ You have not submitted any proposal. To submit proposal click {{proposal.title}} View {% endif %} - {{proposal.rating}} + + {% for rating in ratings %} + {{rating.rating}} + {% endfor %} diff --git a/website/views.py b/website/views.py index 276f70e..b516fad 100755 --- a/website/views.py +++ b/website/views.py @@ -241,17 +241,15 @@ def view_abstracts(request): count_list =[] if user.is_authenticated(): if user.is_superuser : - proposals = Proposal.objects.all() + proposals = Proposal.objects.all().order_by('status') + ratings = Ratings.objects.all() + context['ratings'] = ratings context['proposals'] = proposals - for proposal in proposals: - count = Comments.objects.filter(proposal = proposal).count() - count_list.append(count) - context['counts'] = count_list context['user'] = user return render(request, 'view-abstracts.html', context) elif user is not None: if Proposal.objects.filter(user = user).exists : - proposals = Proposal.objects.filter(user = user) + proposals = Proposal.objects.filter(user = user).order_by('status') context['counts'] = count_list context['proposals'] = proposals context['user'] = user -- cgit