summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordk-152017-05-18 17:29:35 +0530
committerdk-152017-05-18 17:36:23 +0530
commitb469782556fa5c9d5e84713dd613b94c1aad1e7b (patch)
tree5e922d9bdf4451129bdfd1bd77b14bb300db880f
parent1030ef3805cf833a281bd945c009076fdf7ed112 (diff)
downloadSBHS-2018-Rpi-b469782556fa5c9d5e84713dd613b94c1aad1e7b.tar.gz
SBHS-2018-Rpi-b469782556fa5c9d5e84713dd613b94c1aad1e7b.tar.bz2
SBHS-2018-Rpi-b469782556fa5c9d5e84713dd613b94c1aad1e7b.zip
Confirmation mail working
-rw-r--r--sbhs.sqlite3bin120832 -> 120832 bytes
-rw-r--r--sbhs_server/helpers/mailer.py5
-rw-r--r--sbhs_server/settings.py4
-rw-r--r--slot/views.py3
-rw-r--r--templates/account/sub_nav.html2
5 files changed, 9 insertions, 5 deletions
diff --git a/sbhs.sqlite3 b/sbhs.sqlite3
index 8dbe2dd..db3d010 100644
--- a/sbhs.sqlite3
+++ b/sbhs.sqlite3
Binary files differ
diff --git a/sbhs_server/helpers/mailer.py b/sbhs_server/helpers/mailer.py
index 7c58f95..e24d3e5 100644
--- a/sbhs_server/helpers/mailer.py
+++ b/sbhs_server/helpers/mailer.py
@@ -7,10 +7,11 @@ def email(to, subject, message):
smtpserver.ehlo()
smtpserver.starttls()
smtpserver.ehlo()
- smtpserver.esmtp_features['auth']='LOGIN DIGEST-MD5 PLAIN'
+ #smtpserver.esmtp_features['auth']='LOGIN DIGEST-MD5 PLAIN'
smtpserver.login(settings.EMAIL_HOST_USER, settings.EMAIL_HOST_PASSWORD)
header = 'To: ' + to + '\n' + 'From: ' + settings.EMAIL_HOST_USER + '@iitb.ac.in\n' + 'Subject: ' + subject +' \n'
msg = header + '\n' + message + '\n\n'
- smtpserver.sendmail(settings.EMAIL_HOST_USER + '@iitb.ac.in', to, msg)
+ #smtpserver.sendmail(settings.EMAIL_HOST_USER + '@iitb.ac.in', to, msg)
+ smtpserver.sendmail(settings.EMAIL_HOST_USER , to, msg)
smtpserver.close() \ No newline at end of file
diff --git a/sbhs_server/settings.py b/sbhs_server/settings.py
index 58e2cba..5fa1e99 100644
--- a/sbhs_server/settings.py
+++ b/sbhs_server/settings.py
@@ -121,8 +121,8 @@ SESSION_EXPIRE_AT_BROWSER_CLOSE = True
CSRF_COOKIE_NAME = "pfesgbxra"
SESSION_COOKIE_NAME = "frffvbaVq"
-EMAIL_HOST = 'smtp-auth.iitb.ac.in'
-EMAIL_PORT = 25
+EMAIL_HOST = 'smtp.gmail.com' #'smtp-auth.iitb.ac.in'
+EMAIL_PORT = 587 #25
EMAIL_HOST_USER = credentials.EMAIL_HOST_USER
EMAIL_HOST_PASSWORD = credentials.EMAIL_HOST_PASSWORD
diff --git a/slot/views.py b/slot/views.py
index b137f93..e9aa9dd 100644
--- a/slot/views.py
+++ b/slot/views.py
@@ -8,6 +8,9 @@ LIMIT = 2
@login_required(redirect_field_name=None)
def new(req):
+ print ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"
+ print req.user
+ print ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"
cur_slots = Slot.current_slots(req.user.board.mid)
all_slots = Slot.get_free_slots(req.user.board.mid)
date = (datetime.datetime.now()).strftime("%Y-%m-%d")
diff --git a/templates/account/sub_nav.html b/templates/account/sub_nav.html
index 41b3731..17ac8a5 100644
--- a/templates/account/sub_nav.html
+++ b/templates/account/sub_nav.html
@@ -1,4 +1,4 @@
-<div class="span12">
+<div class="span12" style="position: relative;top: 1.3em;">
<ul class="nav nav-pills">
<li id="home-nav"><a href="{% url 'account_home' %}">Home</a></li>
<li id="book-slot-nav"><a href="{% url 'slot_new' %}">Book slot</a></li>