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 @@