From a9b1f51e9766e45438be2ea97a3e75e8997a5373 Mon Sep 17 00:00:00 2001
From: Primal Pappachan
Date: Wed, 11 Apr 2012 12:38:41 +0530
Subject: Added category and pd field
---
aloha/allotter/forms.py | 28 +++++++++++++++++++++-------
1 file changed, 21 insertions(+), 7 deletions(-)
diff --git a/aloha/allotter/forms.py b/aloha/allotter/forms.py
index cd79b0e..480d8b9 100644
--- a/aloha/allotter/forms.py
+++ b/aloha/allotter/forms.py
@@ -1,6 +1,7 @@
from django import forms
from allotter.models import Profile
from django.forms.extras.widgets import SelectDateWidget
+from django.forms.widgets import RadioSelect
from django.utils.encoding import *
@@ -13,6 +14,9 @@ from string import digits, uppercase
BIRTH_YEAR_CHOICES = tuple(range(1960, 1994, 1))
DD_YEAR_CHOICES = (2012,)
+CATEGORY_CHOICES = [('GEN','General'), ('OBC-NM', 'OBC-Non-Minority'), ('OBC-M', 'OBC-Minority'),
+ ('SC', 'SC'), ('ST', 'ST')]
+PD_CHOICES = [('Y', 'Yes'), ('N', 'No')]
class UserLoginForm(forms.Form):
@@ -131,9 +135,18 @@ class UserDetailsForm(forms.Form):
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. For example 02225722545 (with neither spaces nor dashes)")
- cat_check = forms.BooleanField(required=False, initial=False, label="Check this if you belong to SEBC-M Category")
+ 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)")
+
+ category = forms.ChoiceField(widget=forms.Select(attrs={'class':'selector'}),
+ label="Category", choices=CATEGORY_CHOICES,
+ help_text="Category under which you would be considered for admission.")
+
+ pd = forms.ChoiceField(label="Physical Disability", widget=RadioSelect, choices=PD_CHOICES)
+
+
def clean_phone_number(self):
pno = self.cleaned_data['phone_number']
@@ -147,15 +160,16 @@ class UserDetailsForm(forms.Form):
email = self.cleaned_data['email']
phone_number = self.cleaned_data['phone_number']
- cat_check = self.cleaned_data['cat_check']
+ category = self.cleaned_data['category']
if email and phone_number:
user_profile.secondary_email = email
- user_profile.phone_number = phone_number
+ user_profile.phone_number = phone_number
else:
raise forms.ValidationError("Make sure that you have entered all the details.")
- if cat_check:
- user_profile.cat_status = True
-
+
+ user_application = user_profile.application
+ user_application.cgy = category
+ user_application.save()
user_profile.save()
--
cgit
From 9adec90902f59a41b418b19975cfbad2db90f354 Mon Sep 17 00:00:00 2001
From: Primal Pappachan
Date: Wed, 11 Apr 2012 12:39:15 +0530
Subject: added field for pd status, removed cat flag
---
aloha/allotter/models.py | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/aloha/allotter/models.py b/aloha/allotter/models.py
index 3be370f..4d3ac3e 100644
--- a/aloha/allotter/models.py
+++ b/aloha/allotter/models.py
@@ -102,7 +102,9 @@ class Application(models.Model):
cent = models.IntegerField(max_length=10, verbose_name="Center Code")
cgy = models.CharField(max_length=10, verbose_name="Category")
-
+
+ pd_status = models.CharField(max_length=1, verbose_name="Physical Disability",
+ help_text="Y for Yes, N for No", blank=True, default="N")
submitted = models.BooleanField(verbose_name="Submission Status", default=False)
@@ -125,9 +127,7 @@ class Profile(models.Model):
help_text=u"Phone number read from user after authentication")
dd_no = models.CharField(max_length=15, verbose_name="Demand Draft Number", blank=True, null=True)
-
- cat_status = models.BooleanField(help_text="Whether belongs to Category SBOBC", default=False)
-
+
#Application for the Profile
application = models.ForeignKey(Application)
--
cgit
From 31afa442edf5edcd880f67367b91ef32ed6cf89b Mon Sep 17 00:00:00 2001
From: Primal Pappachan
Date: Wed, 11 Apr 2012 12:52:56 +0530
Subject: Removed cat_flag check
---
aloha/allotter/views.py | 7 ++-----
1 file changed, 2 insertions(+), 5 deletions(-)
diff --git a/aloha/allotter/views.py b/aloha/allotter/views.py
index a91b5e5..344669f 100644
--- a/aloha/allotter/views.py
+++ b/aloha/allotter/views.py
@@ -61,10 +61,7 @@ def submit_details(request):
Get the secondary email address, phone number and save it to the Profile.
"""
user = request.user
- category = user.get_profile().application.cgy #Getting the Category information
- #Flag set based on OBC Check
- if category == "B": cat_flag = True
- else: cat_flag = False
+
if request.method == "POST":
form = UserDetailsForm(user, request.POST)
if form.is_valid():
@@ -76,7 +73,7 @@ def submit_details(request):
else:
form = UserDetailsForm(request.user)
- context = {"form": form, "cat_flag": cat_flag}
+ context = {"form": form}
return render(request, 'allotter/details.html', context)
def get_details(user, error_message = ""):
--
cgit
From e3dc4ad8dbd0d86159f8b2404c2ee3eb7b76c76c Mon Sep 17 00:00:00 2001
From: Primal Pappachan
Date: Wed, 11 Apr 2012 12:53:51 +0530
Subject: removed category check
---
aloha/template/allotter/details.html | 9 ---------
1 file changed, 9 deletions(-)
diff --git a/aloha/template/allotter/details.html b/aloha/template/allotter/details.html
index 4cfe1a2..bedcf90 100644
--- a/aloha/template/allotter/details.html
+++ b/aloha/template/allotter/details.html
@@ -1,15 +1,6 @@
{% extends "base.html" %}
{% block title %}Details form {% endblock %}
-{% block scripts %}
-
-{% endblock scripts %}
{% block content %}
Please provide the following details.
--
cgit
From 7a1a193cf3ab9dd90d9ed0175b65e8995df7d092 Mon Sep 17 00:00:00 2001
From: Primal Pappachan
Date: Wed, 11 Apr 2012 12:54:23 +0530
Subject: textual changes
---
aloha/template/allotter/apply.html | 11 ++++++++++-
aloha/template/allotter/complete.html | 16 ++++++++++------
2 files changed, 20 insertions(+), 7 deletions(-)
diff --git a/aloha/template/allotter/apply.html b/aloha/template/allotter/apply.html
index 637594a..3f820be 100644
--- a/aloha/template/allotter/apply.html
+++ b/aloha/template/allotter/apply.html
@@ -83,7 +83,9 @@ and {{second_paper}} ({{second_paper_code}})
qualified in JAM 2012. If you have qualified in more than one paper you are eligible
for programmes covered by both papers. Mention the order of preference (1, 2, 3, etc)
in the last column. In the 'Order of Preference' column, mark None against the programmes
-that you are NOT interested in. Please note: The order of Preference plays an important role in
+that you are NOT interested in.
+
+
Please note: The order of Preference plays an important role in
the admission process.
@@ -92,6 +94,13 @@ under both the papers, the order of preferences should be combined. For example:
qualifying both BT and CY can have an order of preference such as 1 under BT, 2 under CY, 3
under BT and so on.
+
+
+Candidates should ensure that the choices specified by them
+are distinct for each programme of their interest and are in the
+ascending order of their preference - i.e. their most preferred
+programme is selected as 1, etc.
+
The following options have been saved. Please verify them before logging out.
-
-
Please keep in mind that, the next time you login you will be redirected to this page straightaway.
+
Please ensure that the choices listed below are those that you
+intend to submit finally and only then go ahead to the rest of the
+procedure. If there is an error, please use the edit button to go back
+and re-do your choices
{% if options_chosen %}
@@ -50,8 +51,8 @@ An email with the list of options has been sent to {{ email }} for reference.
{% else %}
-
No Options were chosen, click Edit Options to go back and select
-options otherwise click Quit Allotment to exit the allotment process
+
No Options were chosen, click Edit Options to go back and select
+options otherwise click Quit Allotment to exit the allotment process
{% endif %}
@@ -84,7 +85,10 @@ your completed application form to the Organizing chairman
-
+
+
This will finish the application procedure and the choices
+you have given will be taken as final after that.
+
--
cgit
From e45c413946c053832a40eb2fa869e19797705447 Mon Sep 17 00:00:00 2001
From: Primal Pappachan
Date: Wed, 11 Apr 2012 12:58:40 +0530
Subject: Pd status - Y or N
---
aloha/allotter/forms.py | 2 ++
1 file changed, 2 insertions(+)
diff --git a/aloha/allotter/forms.py b/aloha/allotter/forms.py
index 480d8b9..444330c 100644
--- a/aloha/allotter/forms.py
+++ b/aloha/allotter/forms.py
@@ -161,6 +161,7 @@ class UserDetailsForm(forms.Form):
email = self.cleaned_data['email']
phone_number = self.cleaned_data['phone_number']
category = self.cleaned_data['category']
+ pd_status = self.cleaned_data['pd']
if email and phone_number:
user_profile.secondary_email = email
@@ -170,6 +171,7 @@ class UserDetailsForm(forms.Form):
user_application = user_profile.application
user_application.cgy = category
+ user_application.pd_status = pd_status
user_application.save()
user_profile.save()
--
cgit
From fbb5394eca460f53823178d1c3f05e8d4d34ee64 Mon Sep 17 00:00:00 2001
From: Primal Pappachan
Date: Wed, 11 Apr 2012 13:34:00 +0530
Subject: Textual changes based on the mail
---
aloha/allotter/forms.py | 4 ++--
aloha/template/allotter/complete.html | 7 ++++++-
2 files changed, 8 insertions(+), 3 deletions(-)
diff --git a/aloha/allotter/forms.py b/aloha/allotter/forms.py
index 444330c..57a88f4 100644
--- a/aloha/allotter/forms.py
+++ b/aloha/allotter/forms.py
@@ -14,7 +14,7 @@ from string import digits, uppercase
BIRTH_YEAR_CHOICES = tuple(range(1960, 1994, 1))
DD_YEAR_CHOICES = (2012,)
-CATEGORY_CHOICES = [('GEN','General'), ('OBC-NM', 'OBC-Non-Minority'), ('OBC-M', 'OBC-Minority'),
+CATEGORY_CHOICES = [('GEN','General'), ('OBC-NCL', 'OBC-NCL'), ('OBC-NCL-M', 'OBC-NCL(Minorities)'),
('SC', 'SC'), ('ST', 'ST')]
PD_CHOICES = [('Y', 'Yes'), ('N', 'No')]
@@ -142,7 +142,7 @@ class UserDetailsForm(forms.Form):
category = forms.ChoiceField(widget=forms.Select(attrs={'class':'selector'}),
label="Category", choices=CATEGORY_CHOICES,
- help_text="Category under which you would be considered for admission.")
+ help_text="The category you select is normally the one you have specified at the time of applying for the JAM 2012 examination. The category verification is only after submitting the relevantdocuments and scrutiny by the JAM 2012 committee and the institute for which you are applying. Candidates applying under the new category OBC-M should have specified OBC at the time of applying for the JAM 2012 and would now have to supply the additional relevant documents for this category.")
pd = forms.ChoiceField(label="Physical Disability", widget=RadioSelect, choices=PD_CHOICES)
diff --git a/aloha/template/allotter/complete.html b/aloha/template/allotter/complete.html
index cc8e4e5..fc205a7 100644
--- a/aloha/template/allotter/complete.html
+++ b/aloha/template/allotter/complete.html
@@ -65,7 +65,12 @@ will be deleted.
-
Click on the button Download Application PDF to download a PDF of the application form.
+
Click on the button Download Application PDF to download
+a PDF of the application form.
+Candidates are advised
+to read the JAM 2012 brochure and JAM 2012 website carefully
+regarding Minimum Educational Qualification and Aggregate Marks
+requirements and other details before sending in their application
Download Application PDF
--
cgit
From c568b73aa5031df83eeb98cb784d6c3dee4fc8c0 Mon Sep 17 00:00:00 2001
From: parth
Date: Wed, 11 Apr 2012 13:46:29 +0530
Subject: password less login
---
aloha/allotter/forms.py | 26 ++++++++++++++------------
aloha/settings.py | 2 ++
2 files changed, 16 insertions(+), 12 deletions(-)
diff --git a/aloha/allotter/forms.py b/aloha/allotter/forms.py
index cd79b0e..3c4cb5c 100644
--- a/aloha/allotter/forms.py
+++ b/aloha/allotter/forms.py
@@ -10,6 +10,7 @@ from crispy_forms.helper import FormHelper
from crispy_forms.layout import Submit
from string import digits, uppercase
+import settings
BIRTH_YEAR_CHOICES = tuple(range(1960, 1994, 1))
DD_YEAR_CHOICES = (2012,)
@@ -22,8 +23,8 @@ class UserLoginForm(forms.Form):
help_text="As on your Examination Admit Card")
##Application number as password
- password = forms.CharField(label = "Application Number",
- max_length=10, help_text="As on your Examination Admit Card")
+ #password = forms.CharField(label = "Application Number",
+ # max_length=10, help_text="As on your Examination Admit Card")
dob = forms.DateField(label="Date of Birth",
widget=SelectDateWidget(years=BIRTH_YEAR_CHOICES, attrs={"class":"span1"}),
@@ -60,22 +61,23 @@ class UserLoginForm(forms.Form):
except User.DoesNotExist:
raise forms.ValidationError("Entered Registration Number haven't appeared for JAM Exam.")
- def clean_password(self):
-
- pwd = self.cleaned_data['password']
-
+# def clean_password(self):
+#
+# pwd = self.cleaned_data['password']
+#
##Verifying the length of application number and whether it contains
##only digits.
- if str(pwd).strip(digits) and len(pwd) != 5:
- msg = "Not a valid Application Number"
- raise forms.ValidationError(msg)
-
- return pwd
+# if str(pwd).strip(digits) and len(pwd) != 5:
+# msg = "Not a valid Application Number"
+# raise forms.ValidationError(msg)
+#
+# return pwd
def clean(self):
super(UserLoginForm, self).clean()
- u_name, pwd = self.cleaned_data.get('username'), self.cleaned_data.get('password')
+ u_name = self.cleaned_data.get('username')
+ pwd = settings.DEFAULT_PASSWORD
dob = self.cleaned_data["dob"]
dd_no = self.cleaned_data.get("dd_no")
dd_date = self.cleaned_data.get("dd_date")
diff --git a/aloha/settings.py b/aloha/settings.py
index e75064b..8efb057 100644
--- a/aloha/settings.py
+++ b/aloha/settings.py
@@ -185,3 +185,5 @@ APPLICATION_PDF = "application.pdf"
AUTO_LOGOUT_DELAY = 15
+DEFAULT_PASSWORD = "JamPassword"
+
--
cgit
From bf29492ebfe3d9be881a94733e5d865d83e61295 Mon Sep 17 00:00:00 2001
From: parth
Date: Wed, 11 Apr 2012 14:04:52 +0530
Subject: made changes for password less login
---
aloha/allotter/management/commands/loadusers.py | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/aloha/allotter/management/commands/loadusers.py b/aloha/allotter/management/commands/loadusers.py
index 99fd075..172aa95 100644
--- a/aloha/allotter/management/commands/loadusers.py
+++ b/aloha/allotter/management/commands/loadusers.py
@@ -3,6 +3,7 @@ from datetime import datetime
from csv import DictReader
from django.core.management.base import BaseCommand
from allotter.models import Exam, Application, User, Profile
+from settings import DEFAULT_PASSWORD
class Command(BaseCommand):
option_list = BaseCommand.option_list + (
@@ -38,9 +39,8 @@ def load_users(options):
for data in userReader:
- appno = data['AppNo.']
regno = data['Reg.No.']
- new_user = User.objects.create_user(regno, password=appno, email="")
+ new_user = User.objects.create_user(regno, password=DEFAULT_PASSWORD, email="")
application = Application(user=new_user)
application.np = int(data['NP'])
if data['P1'].strip():
@@ -56,10 +56,9 @@ def load_users(options):
application.nat = data['Nat']
application.gender = data['Gdr']
application.cent = data['Cent']
- application.cgy = data['Cgy']
application.save()
dob = datetime.strptime(data['DOB'], "%d/%m/%y")
new_profile = Profile(user=new_user, application=application)
new_profile.dob = dob
new_profile.save()
- print "Added user with {0} and {1} with dob as {2}".format(appno,regno,dob)
\ No newline at end of file
+ print "Added user with {0} with dob as {1}".format(regno,dob)
--
cgit
From 75fdf0a2166d03b41cbccce3f2500c30044daf90 Mon Sep 17 00:00:00 2001
From: parth
Date: Wed, 11 Apr 2012 14:05:21 +0530
Subject: Now compatible with ie8 and ff3
---
aloha/static/js/browser-check.js | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/aloha/static/js/browser-check.js b/aloha/static/js/browser-check.js
index 17bda46..3f1bfcf 100644
--- a/aloha/static/js/browser-check.js
+++ b/aloha/static/js/browser-check.js
@@ -1,8 +1,8 @@
$(document).ready(function(){
- if(($.browser.msie) && ($.browser.version <8)){
+ if(($.browser.msie) && ($.browser.version <=7)){
window.location="/browser-version"
}
- if(($.browser.mozilla) && (parseInt($.browser.version) <=5)){
+ if(($.browser.mozilla) && (parseInt($.browser.version) <3)){
window.location="/browser-version"
}
if(($.browser.webkit) && (parseInt($.browser.version <=530))){
--
cgit
From c3938750c6c33eec8d921a332aca91505e7da1d4 Mon Sep 17 00:00:00 2001
From: parth
Date: Wed, 11 Apr 2012 14:06:05 +0530
Subject: Made only None selected by default, to work with IE
---
aloha/template/allotter/apply.html | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/aloha/template/allotter/apply.html b/aloha/template/allotter/apply.html
index 39d1411..91b2783 100644
--- a/aloha/template/allotter/apply.html
+++ b/aloha/template/allotter/apply.html
@@ -124,7 +124,7 @@ Listing the options for first test paper.
{{option.opt_location }}
@@ -154,7 +154,7 @@ Listing the options for first test paper.
You are eligible for programmes on the basis of {{first_paper}} ({{first_paper_code}})
+
You are eligible for programmes on the basis of {{first_paper}} ({{first_paper_code}})
{% comment %}
Checking if there is second paper and displaying its name.
@@ -65,7 +65,7 @@ and {{second_paper}} ({{second_paper_code}})
{% endif %}
-
+
@@ -78,19 +78,21 @@ that you are NOT interested in.
Please note: The order of Preference plays an important role in
the admission process.
-
-Note: If you have qualified in two papers in JAM 2012 and would like to choose programmes eligible
+
+
Note
+If you have qualified in two papers in JAM 2012 and would like to choose programmes eligible
under both the papers, the order of preferences should be combined. For example: a candidate
qualifying both BT and CY can have an order of preference such as 1 under BT, 2 under CY, 3
-under BT and so on.
-
+under BT and so on.
+
-
+
+
Warning!
Candidates should ensure that the choices specified by them
are distinct for each programme of their interest and are in the
ascending order of their preference - i.e. their most preferred
programme is selected as 1, etc.
-
+
diff --git a/aloha/template/allotter/complete.html b/aloha/template/allotter/complete.html
index fc205a7..7961db4 100644
--- a/aloha/template/allotter/complete.html
+++ b/aloha/template/allotter/complete.html
@@ -58,13 +58,14 @@ options otherwise click Quit Allotment to exit the allotment process
+
You may edit your options by clicking Edit Options. Please keep in mind that your previous options
will be deleted.
-
+
Click on the button Download Application PDF to download
a PDF of the application form.
Candidates are advised
@@ -86,13 +87,13 @@ your completed application form to the Organizing chairman