From 3362ec320c62c7053f1c14dff30e01fcbd52ee34 Mon Sep 17 00:00:00 2001 From: komalsheth286 Date: Fri, 7 Oct 2016 14:57:05 +0530 Subject: Redirection issues on accounts/login --- scipy2016/settings.py | 12 +++--------- website/models.py | 3 ++- website/templates/base.html | 4 ++-- website/templates/cfp.html | 4 ++-- website/templates/submit-cfw.html | 2 +- website/views.py | 26 +++++++++++++++----------- 6 files changed, 25 insertions(+), 26 deletions(-) diff --git a/scipy2016/settings.py b/scipy2016/settings.py index d1630c8..c307bf0 100755 --- a/scipy2016/settings.py +++ b/scipy2016/settings.py @@ -154,14 +154,8 @@ STATIC_URL = '/static/' MEDIA_ROOT = os.path.join(BASE_DIR, 'uploads') MEDIA_URL = "/downloads/" -LOGIN_REDIRECT_URL = '/cfp' +LOGIN_URL = '/2016/accounts/login/' +LOGIN_REDIRECT_URL = '/2016/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 +# smtp diff --git a/website/models.py b/website/models.py index c3b2709..54131f2 100755 --- a/website/models.py +++ b/website/models.py @@ -3,10 +3,11 @@ from django.contrib.auth.models import User from social.apps.django_app.default.models import UserSocialAuth from scipy2016 import settings +import os def get_document_dir(instance, filename): # ename, eext = instance.user.email.split("@") - fname, fext = filename.split(".") + fname, fext = os.path.splitext(filename) print "----------------->",instance.user return '%s/attachment/%s/%s.%s' % (instance.user, instance.proposal_type, fname+'_'+str(instance.user), fext) diff --git a/website/templates/base.html b/website/templates/base.html index e196699..35f237b 100755 --- a/website/templates/base.html +++ b/website/templates/base.html @@ -169,7 +169,7 @@ Accomodation

₹500

- Add On + Add On Accommodation is provided on a shared basis (twin sharing) inside IIT-B campus (Boys/Girls hostel). Accommodation will be provided for 2 days, i.e, 10-11 and 11-12 December. Accommodation does not include other amenities like dinner, etc. Extension of period of stay is not available. This is a non-refundable ticket. @@ -179,7 +179,7 @@ T-Shirt

₹350

- Add On + Add On Change of size, exchange at the venue is not available. This is a non-refundable ticket. diff --git a/website/templates/cfp.html b/website/templates/cfp.html index dfc2bb9..0ab52e5 100755 --- a/website/templates/cfp.html +++ b/website/templates/cfp.html @@ -107,7 +107,7 @@ {{ form.as_p }}

Create an Account - Forgot Password? + Forgot Password? {% csrf_token %} @@ -137,4 +137,4 @@ {% endblock %} - \ No newline at end of file + diff --git a/website/templates/submit-cfw.html b/website/templates/submit-cfw.html index cae6d34..75e8a95 100755 --- a/website/templates/submit-cfw.html +++ b/website/templates/submit-cfw.html @@ -69,7 +69,7 @@