summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKomal Sheth2016-10-07 14:58:23 +0530
committerGitHub2016-10-07 14:58:23 +0530
commitc457916af0aae468556d7bfa004969e9220865a3 (patch)
treed794f4f789f4c51cd3c6c38285224dbf1bb25a1c
parent71c8ed9f9548f3cc8531c436a10d1af44ca19774 (diff)
parent3362ec320c62c7053f1c14dff30e01fcbd52ee34 (diff)
downloadSciPy2016-c457916af0aae468556d7bfa004969e9220865a3.tar.gz
SciPy2016-c457916af0aae468556d7bfa004969e9220865a3.tar.bz2
SciPy2016-c457916af0aae468556d7bfa004969e9220865a3.zip
Merge pull request #28 from FOSSEE/Home_page
Redirection issues on accounts/login resolved
-rwxr-xr-xscipy2016/settings.py12
-rwxr-xr-xwebsite/models.py3
-rwxr-xr-xwebsite/templates/base.html4
-rwxr-xr-xwebsite/templates/cfp.html4
-rwxr-xr-xwebsite/templates/submit-cfw.html2
-rwxr-xr-xwebsite/views.py26
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 @@
<td bgcolor ="#9bb2e1">
<h9 style="color:white;">Accomodation</h9>
<h2 style="color:white;" style ="font-size: 25px;">&#8377;500</h2>
- <h9 style="color:white;"><a href="#"> Add On </a></h9>
+ <h9 style="color:white;"><a href="https://scipyindia2016.doattend.com/get_addons"> Add On </a></h9>
</td>
<td>
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 @@
<td bgcolor= "#8cc9f0">
<h9 style="color:white;">T-Shirt</h9>
<h2 style="color:white;" style ="font-size: 25px;">&#8377;350</h2>
- <h9 style="color:white;"><a href="#"> Add On </a></h9>
+ <h9 style="color:white;"><a href="https://scipyindia2016.doattend.com/get_addons"> Add On </a></h9>
</td>
<td>
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 }}
<button class="button special" style="background:#D44727" name ="login"type="submit">Login</button><br><br>
<a style="padding-right : 20px;" href="{% url 'website:userregister' %}" class="btn btn btn-primary">Create an Account</a>
- <a href="/forgotpassword/">Forgot Password?</a>
+ <a href="/2016/forgotpassword/">Forgot Password?</a>
{% csrf_token %}
</form>
<!-- </div> -->
@@ -137,4 +137,4 @@
{% endblock %}
</body>
-</html> \ No newline at end of file
+</html>
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 @@
<!-- <li>To be announced</li><br> -->
<ul>
<li>The project you are willing to present should be an actual implementation rather than just an idea.
- <li>Abstract should be of 300 to 700 words describing the topic, including its relevance to scientific computing.
+ <li>Dscription should be of 300 to 700 words describing the topic, including its relevance to scientific computing.
<li>Proposals with an aim to promote a commercial product or service will be rejected.
<li>In your abstract mention about various tools/libraries used for development.
<li>Notification for selection/rejection of your proposal will be given through email.
diff --git a/website/views.py b/website/views.py
index 410575e..6870200 100755
--- a/website/views.py
+++ b/website/views.py
@@ -309,15 +309,19 @@ def abstract_details(request, proposal_id=None):
return render(request, 'abstract_details.html', context)
elif user is not None:
proposal = Proposal.objects.get(id=proposal_id)
- url = '/2016'+str(proposal.attachment.url)
- comments = Comments.objects.filter(proposal=proposal)
- context['proposal'] = proposal
- context['user'] = user
- context['url'] = url
- context['comments'] = comments
- path, filename = os.path.split(str(proposal.attachment))
- context['filename'] = filename
- return render(request, 'abstract-details.html', context)
+ print "------------------> owner",proposal.user
+ if proposal.user = user:
+ url = '/2016'+str(proposal.attachment.url)
+ comments = Comments.objects.filter(proposal=proposal)
+ context['proposal'] = proposal
+ context['user'] = user
+ context['url'] = url
+ context['comments'] = comments
+ path, filename = os.path.split(str(proposal.attachment))
+ context['filename'] = filename
+ return render(request, 'abstract-details.html', context)
+ else:
+ return render(request, 'cfp.html', context)
else:
return render(request, 'cfp.html', context)
@@ -455,12 +459,12 @@ def status(request, proposal_id= None):
if proposal.proposal_type == 'ABSTRACT':
subject = "SciPy India 2016 - Talk Proposal Accepted"
message = """Dear """+proposal.user.first_name+""",
- Congratulations. Your proposal for the talk titled '"""+ proposal.title+ """'is accepted.
+ Congratulations. Your proposal for the talk titled '"""+ proposal.title+ """' is accepted.
You shall present the talk at the conference.\n\nYou will be notified regarding instructions of your talk via email.\n\nThank You ! \n\nRegards,\nSciPy India 2016,\nFOSSEE - IIT Bombay"""
elif proposal.proposal_type == 'WORKSHOP':
subject = "SciPy India 2016 - Workshop Proposal Accepted"
message = """Dear """+proposal.user.first_name+""",
- Congratulations. Your proposal for the workshop titled '"""+ proposal.title+ """'is accepted.
+ Congratulations. Your proposal for the workshop titled '"""+ proposal.title+ """' is accepted.
You shall conduct the workshop at the conference.\n\nYou will be notified regarding instructions of your workshop via email.\n\nThank You ! \n\nRegards,\nSciPy India 2016,\nFOSSEE - IIT Bombay"""
send_mail(subject, message, sender_email, to)
context.update(csrf(request))