summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--aloha/allotter/forms.py6
-rw-r--r--aloha/allotter/views.py10
-rw-r--r--aloha/production.py18
-rw-r--r--aloha/settings.py9
-rw-r--r--aloha/static/img/glyphicons-halflings-white.pngbin4352 -> 0 bytes
-rw-r--r--aloha/static/img/glyphicons-halflings.pngbin4352 -> 0 bytes
-rw-r--r--aloha/template/404.html2
-rw-r--r--aloha/template/500.html2
-rw-r--r--aloha/template/allotter/apply.html16
-rw-r--r--aloha/template/allotter/login.html2
-rw-r--r--aloha/template/browser-version.html2
-rw-r--r--docs/course_code_names.txt1
-rw-r--r--docs/paper_course_code_eligibility.txt2
13 files changed, 38 insertions, 32 deletions
diff --git a/aloha/allotter/forms.py b/aloha/allotter/forms.py
index cfaa031..cd79b0e 100644
--- a/aloha/allotter/forms.py
+++ b/aloha/allotter/forms.py
@@ -125,15 +125,15 @@ class UserDetailsForm(forms.Form):
self.helper.form_id = 'id-detailsform'
self.helper.form_method = 'post'
self.helper.form_class = 'form-horizontal'
- self.helper.form_action = "/allotter/"+user.username+"/details/"
+ self.helper.form_action = "/allotter/details/"
self.helper.add_input(Submit('submit', 'Submit'))
super(UserDetailsForm, self).__init__(*args, **kwargs)
email = forms.EmailField(label="Email Address", widget=forms.TextInput(attrs={"placeholder":"john@example.com",}),
help_text="Enter a valid email id where you will able to receive correspondence from JAM 2012.")
- phone_number = forms.CharField(label="Phone number", max_length=15, widget=forms.TextInput(attrs={"placeholder":"9876543210",}), help_text="Phone number with code")
+ phone_number = forms.CharField(label="Phone number", max_length=15, widget=forms.TextInput(attrs={"placeholder":"9876543210",}), help_text="Phone number with code. For example 02225722545 (with neither spaces nor dashes)")
- cat_check = forms.BooleanField(required=False, initial=False, label="Check this if you belong to SEBC Category")
+ cat_check = forms.BooleanField(required=False, initial=False, label="Check this if you belong to SEBC-M Category")
def clean_phone_number(self):
pno = self.cleaned_data['phone_number']
diff --git a/aloha/allotter/views.py b/aloha/allotter/views.py
index 30b921a..8be51ef 100644
--- a/aloha/allotter/views.py
+++ b/aloha/allotter/views.py
@@ -34,8 +34,8 @@ def user_login(request):
status = user.get_profile().application.submitted #Getting the submission status
if status: #If already submitted, takes to Completion Page
return redirect('/allotter/complete/')
- else: #Otherwise to Option Choosing Page
- return redirect('/allotter/apply/')
+ else: #Otherwise to Details Submission form
+ return redirect('/allotter/details/')
if request.method == "POST":
form = UserLoginForm(request.POST)
@@ -202,6 +202,7 @@ def complete_allotment(request):
counter += 1
content += "\n \n \nPlease do not delete this email and keep it for reference purposes. \n \n \n \n Regards, \n JAM Office, IIT Bombay"
+ send_mail(subject, content, from_email, [sec_email])
admin_content = content
admin_content +="\n\n\n#%s:" % (reg_no)
counter = 1
@@ -209,9 +210,8 @@ def complete_allotment(request):
admin_content += "%s,%s:" %(counter, option.opt_code)
counter += 1
admin_content +="#"
- admin_content += time.ctime()
- #send_mail(subject, content, from_email, [sec_email])
- #mail_admins(subject, admin_content)
+ admin_content += time.ctime()
+ mail_admins(subject, admin_content)
return render(request, 'allotter/complete.html', context)
diff --git a/aloha/production.py b/aloha/production.py
index 68f1306..b101d12 100644
--- a/aloha/production.py
+++ b/aloha/production.py
@@ -3,11 +3,13 @@ from aloha.settings import *
DEBUG=False
TEMPLATE_DEBUG=DEBUG
-
-DATABASES["default"]["ENGINE"] = 'django.db.backends.mysql'
-DATABASES["default"]["NAME"] = ''
-DATABASES["default"]["USER"] = ''
-
-from aloha.local import DATABASE_PASSWORD
-# Imports DATABASE_PASSWORD from testapp/local.py that is not part of git repo
-DATABASES["default"]["PASSWORD"] = DATABASE_PASSWORD
+DATABASES = {
+ 'default': {
+ 'ENGINE': 'django.db.backends.mysql', # Add 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'oracle'.
+ 'NAME': 'jamallotment', # Or path to database file if using sqlite3.
+ 'USER': 'jam_user', # Not used with sqlite3.
+ 'PASSWORD': 'Jam@2012Fossee', # Not used with sqlite3.
+ 'HOST': '', # Set to empty string for localhost. Not used with sqlite3.
+ 'PORT': '', # Set to empty string for default. Not used with sqlite3.
+ }
+}
diff --git a/aloha/settings.py b/aloha/settings.py
index 8889dc6..e75064b 100644
--- a/aloha/settings.py
+++ b/aloha/settings.py
@@ -7,8 +7,7 @@ DEBUG = True
TEMPLATE_DEBUG = DEBUG
ADMINS = (
- ('Primal Pappachan', 'primal@fossee.in'),
- ('Parth Buch', 'parth.buch.115@gmail.com'),
+ ('JAM Admissions 2012', 'gate3@iitb.ac.in'),
)
AUTHORS = (
@@ -173,9 +172,9 @@ EMAIL_HOST = 'smtp-auth.iitb.ac.in'
EMAIL_PORT = '25'
# Optional SMTP authentication information for EMAIL_HOST.
-EMAIL_HOST_USER = ''
-EMAIL_HOST_PASSWORD = ''
-EMAIL_USE_TLS = False
+EMAIL_HOST_USER = 'gate3'
+EMAIL_HOST_PASSWORD = 'inter7384'
+EMAIL_USE_TLS = True
diff --git a/aloha/static/img/glyphicons-halflings-white.png b/aloha/static/img/glyphicons-halflings-white.png
deleted file mode 100644
index a20760b..0000000
--- a/aloha/static/img/glyphicons-halflings-white.png
+++ /dev/null
Binary files differ
diff --git a/aloha/static/img/glyphicons-halflings.png b/aloha/static/img/glyphicons-halflings.png
deleted file mode 100644
index 92d4445..0000000
--- a/aloha/static/img/glyphicons-halflings.png
+++ /dev/null
Binary files differ
diff --git a/aloha/template/404.html b/aloha/template/404.html
index bbc1331..fe29099 100644
--- a/aloha/template/404.html
+++ b/aloha/template/404.html
@@ -1,7 +1,7 @@
{% extends "base.html" %}
-{% block title %}Login{% endblock title %}
+{% block title %}The requested page is not available{% endblock title %}
{% block content %}
<h2> Welcome to the JAM 2012 Admission website</h2>
diff --git a/aloha/template/500.html b/aloha/template/500.html
index b55f7dd..d5c4f7e 100644
--- a/aloha/template/500.html
+++ b/aloha/template/500.html
@@ -1,7 +1,7 @@
{% extends "base.html" %}
-{% block title %}Login{% endblock title %}
+{% block title %}Internal Server Error...{% endblock title %}
{% block content %}
<h2> Welcome to the JAM 2012 Admission website</h2>
diff --git a/aloha/template/allotter/apply.html b/aloha/template/allotter/apply.html
index 9189828..637594a 100644
--- a/aloha/template/allotter/apply.html
+++ b/aloha/template/allotter/apply.html
@@ -9,7 +9,7 @@ $(document).ready(function(){
if(($.browser.msie) && ($.browser.version <=8)){
window.location="/browser-version"
}
- if(($.browser.mozilla) && (parseInt($.browser.version) <=7)){
+ if(($.browser.mozilla) && (parseInt($.browser.version) <=5)){
window.location="/browser-version"
}
if(($.browser.webkit) && (parseInt($.browser.version <=530))){
@@ -18,26 +18,32 @@ $(document).ready(function(){
});
</script>
<script>
-$(document).ready(function(){
+jQuery.fn.reset = function () {
+ $(this).each (function() { this.reset(); });
+}
+
+$(document).ready(function(){
$("#check").click(function() {
$("#checkButton").attr("disabled", !this.checked);
});
});
</script>
+
<script>
$(document).ready(function(){
+ $("#allotment-form").reset();
+ $("select").attr('disabled', false)
$("select").change(function () {
- console.log("here we go")
var $this = $(this);
var thisClass = $this.attr("class");
var prevVal = $this.data("prev");
var otherSelects = $("select").not(this);
var otherSameSelects = $("select[class=" + thisClass + "]").not(this);
- console.log(otherSameSelects)
if ($(this).val() !="0"){
otherSelects.find("option[value=" + $(this).val() + "]").attr('disabled', true);
otherSameSelects.find("option[value=" + $(this).val() + "]").attr('selected', 'selected');
+ otherSameSelects.attr('disabled', true);
}
if (prevVal) {
otherSelects.find("option[value=" + prevVal + "]").attr('disabled', false);
@@ -100,7 +106,7 @@ Listing the options for first test paper.
{% if error_message %}<p><strong>{{ error_message }}</strong></p>{% endif %}
-<form action="/allotter/submit/" method="post">
+<form action="/allotter/submit/" method="post" id="allotment-form">
{% csrf_token %}
<table class="table table-bordered table-striped">
diff --git a/aloha/template/allotter/login.html b/aloha/template/allotter/login.html
index 8f7e755..ca8dc57 100644
--- a/aloha/template/allotter/login.html
+++ b/aloha/template/allotter/login.html
@@ -8,7 +8,7 @@ $(document).ready(function(){
if(($.browser.msie) && ($.browser.version <=8)){
window.location="/browser-version"
}
- if(($.browser.mozilla) && (parseInt($.browser.version) <=7)){
+ if(($.browser.mozilla) && (parseInt($.browser.version) <=5)){
window.location="/browser-version"
}
if(($.browser.webkit) && (parseInt($.browser.version <=530))){
diff --git a/aloha/template/browser-version.html b/aloha/template/browser-version.html
index 891c61a..e74cf39 100644
--- a/aloha/template/browser-version.html
+++ b/aloha/template/browser-version.html
@@ -1,7 +1,7 @@
{% extends "base.html" %}
-{% block title %}Login{% endblock title %}
+{% block title %}Unsupported browser{% endblock title %}
{% block content %}
<h2> Welcome to the JAM 2012 Admission website</h2>
diff --git a/docs/course_code_names.txt b/docs/course_code_names.txt
index a576df1..48f576f 100644
--- a/docs/course_code_names.txt
+++ b/docs/course_code_names.txt
@@ -27,7 +27,6 @@
405:M.Sc.-Ph.D. Dual Degree in Physics:IIT Kanpur
501:Joint M.Sc.-Ph.D. Programme in Chemistry:IIT Kharagpur
502:Joint M.Sc.-Ph.D. Programme in Geology:IIT Kharagpur
-503:Joint M.Sc.-Ph.D. Programme in Geophysics:IIT Kharagpur
504:Joint M.Sc.-Ph.D. Programme in Mathematics:IIT Kharagpur
505:Joint M.Sc.-Ph.D. Programme in Physics:IIT Kharagpur
601:M.Sc. Chemistry (4 Semesters):IIT Madras
diff --git a/docs/paper_course_code_eligibility.txt b/docs/paper_course_code_eligibility.txt
index 4f8c8e1..5b5009b 100644
--- a/docs/paper_course_code_eligibility.txt
+++ b/docs/paper_course_code_eligibility.txt
@@ -2,7 +2,7 @@ BT:104:110:113:703
CA:709
CY:105:111:112:113:201:301:401:501:601:704:801
GG:101:108:502:701:707
-GP:102:109:503:708
+GP:102:109:708
MA:106:112:113:114:202:302:402:504:602:702:705
MS:103:114:404
PH:107:112:113:115:116:203:303:403:405:505:603:706:802