summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSashi202018-09-17 16:32:56 +0530
committerSashi202018-09-17 16:32:56 +0530
commitcb6b8b3112363c8717575ee09f4447404ab99c59 (patch)
treeb61eb5b553914edbb5c890f22ae4fb4b3ed09125
parent8c6c66af7b4b628a2063261ffd240ee4c715f62f (diff)
downloadnccps-2018-cb6b8b3112363c8717575ee09f4447404ab99c59.tar.gz
nccps-2018-cb6b8b3112363c8717575ee09f4447404ab99c59.tar.bz2
nccps-2018-cb6b8b3112363c8717575ee09f4447404ab99c59.zip
Added nccps-2018 prefix to the urls
-rw-r--r--nccps2018/urls.py14
-rw-r--r--static/website/templates/navbar.html2
-rw-r--r--static/website/templates/registration/login.html2
-rw-r--r--website/models.py2
-rw-r--r--website/views.py8
5 files changed, 14 insertions, 14 deletions
diff --git a/nccps2018/urls.py b/nccps2018/urls.py
index 0913857..a688f8b 100644
--- a/nccps2018/urls.py
+++ b/nccps2018/urls.py
@@ -19,23 +19,23 @@ from django.contrib.auth import views as auth_views
urlpatterns = [
- re_path(r'^', include('website.urls', namespace='website')),
+ re_path(r'^nccps-2018/', include('website.urls', namespace='website')),
re_path(r'^nccps-2018/accounts/',
include(('django.contrib.auth.urls', 'auth'), namespace='auth')),
path('nccps-2018/admin/', admin.site.urls),
re_path(r'^', include('social.apps.django_app.urls', namespace='social')),
- re_path(r'^nccps-2018/forgotpassword/$', auth_views.PasswordResetView.as_view(
+ re_path(r'^forgotpassword/$', auth_views.PasswordResetView.as_view(
template_name='registration/password_reset_form.html'), name="password_reset"),
- re_path(r'^nccps-2018/password_reset/(?P<uidb64>[0-9A-Za-z]+)-(?P<token>.+)/$', auth_views.PasswordResetConfirmView.as_view(
+ re_path(r'^password_reset/(?P<uidb64>[0-9A-Za-z]+)-(?P<token>.+)/$', auth_views.PasswordResetConfirmView.as_view(
template_name='registration/password_reset_confirm.html'), name='password_reset_confirm'),
- re_path(r'^nccps-2018/password_reset/mail_sent/$', auth_views.PasswordResetDoneView.as_view(template_name='registration/password_reset_done.html'),
+ re_path(r'^password_reset/mail_sent/$', auth_views.PasswordResetDoneView.as_view(template_name='registration/password_reset_done.html'),
name='password_reset_done'),
- re_path(r'^nccps-2018/password_reset/complete/$', auth_views.PasswordResetCompleteView.as_view(template_name='registration/password_reset_complete.html'),
+ re_path(r'^password_reset/complete/$', auth_views.PasswordResetCompleteView.as_view(template_name='registration/password_reset_complete.html'),
name='password_reset_complete'),
- re_path(r'^nccps-2018/changepassword/$', auth_views.PasswordChangeView.as_view(template_name='registration/password_change_form.html'),
+ re_path(r'^changepassword/$', auth_views.PasswordChangeView.as_view(template_name='registration/password_change_form.html'),
name='password_change'),
- re_path(r'^nccps-2018/password_change/done/$', auth_views.PasswordChangeDoneView.as_view(template_name='registration/password_change_done.html'),
+ re_path(r'^password_change/done/$', auth_views.PasswordChangeDoneView.as_view(template_name='registration/password_change_done.html'),
name='password_change_done'),
] \ No newline at end of file
diff --git a/static/website/templates/navbar.html b/static/website/templates/navbar.html
index 001fce8..7786466 100644
--- a/static/website/templates/navbar.html
+++ b/static/website/templates/navbar.html
@@ -49,7 +49,7 @@
<ul class="dropdown-menu">
<li><a href="{% url 'website:proposal' %}">Submit your Paper</a></li>
<li><a href="{{SITE_URL}}/#registration">Book your Ticket</a></li>
- <li><a href="{% url 'auth:logout' %}?next=/"><i class="fa fa-sign-out"></i>&nbsp;Logout</a></li>
+ <li><a href="{% url 'auth:logout' %}?next=/nccps-2018"><i class="fa fa-sign-out"></i>&nbsp;Logout</a></li>
</ul>
</li>
diff --git a/static/website/templates/registration/login.html b/static/website/templates/registration/login.html
index 86a90c6..319897c 100644
--- a/static/website/templates/registration/login.html
+++ b/static/website/templates/registration/login.html
@@ -14,7 +14,7 @@
Hi {{ user.username }}!
{% else %}
<p>You are not logged in</p>
- <a href="{% url 'login' %}">login</a>
+ <a href="{% url 'auth:login' %}">login</a>
{% endif %}
<h2>Login</h2>
<form method="post">
diff --git a/website/models.py b/website/models.py
index f5b004a..06a84ac 100644
--- a/website/models.py
+++ b/website/models.py
@@ -31,7 +31,7 @@ def get_document_dir(instance, filename):
# ename, eext = instance.user.email.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)
+ return 'paper_uploads/%s/attachment/%s/%s.%s' % (instance.user, instance.proposal_type, fname+'_'+str(instance.user), fext)
class Proposal(models.Model):
diff --git a/website/views.py b/website/views.py
index 444c8f9..cd83f74 100644
--- a/website/views.py
+++ b/website/views.py
@@ -170,7 +170,7 @@ def view_abstracts(request):
def user_login(request):
user = request.user
if request.user.is_authenticated:
- return redirect('/proposal/')
+ return redirect('/nccps-2018/proposal/')
else:
if request.method == "POST":
context = {}
@@ -183,7 +183,7 @@ def user_login(request):
login(request, user)
proposals = Proposal.objects.filter(user=request.user).count()
context['user'] = user
- return redirect('/proposal')
+ return redirect('/nccps-2018/proposal')
#template = loader.get_template('index.html')
#return render(request, 'index.html', context)
else:
@@ -957,14 +957,14 @@ def user_register(request):
return render(request, 'view-profile.html')
else:
if request.user.is_authenticated:
- return redirect('/view_profile/')
+ return redirect('/nccps-2018/view_profile/')
return render(
request, "user-register.html",
{"form": form}
)
else:
if request.user.is_authenticated and is_email_checked(request.user):
- return redirect('/view_profile/')
+ return redirect('/nccps-2018/view_profile/')
elif request.user.is_authenticated:
return render(request, 'activation.html')
form = UserRegistrationForm()