summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPrimal Pappachan2012-04-02 12:13:26 +0530
committerPrimal Pappachan2012-04-02 12:13:26 +0530
commitc4c4c85dd990db7ade50408d71d7fefdb7fd97b9 (patch)
tree1c174b0787b56af16f499e1c821bfc5a803cd2d5
parent1d1a7e90c6250827c00362e9ee79bbb13d320917 (diff)
downloadaloha-c4c4c85dd990db7ade50408d71d7fefdb7fd97b9.tar.gz
aloha-c4c4c85dd990db7ade50408d71d7fefdb7fd97b9.tar.bz2
aloha-c4c4c85dd990db7ade50408d71d7fefdb7fd97b9.zip
passing the category status as context
-rw-r--r--aloha/allotter/views.py9
1 files changed, 6 insertions, 3 deletions
diff --git a/aloha/allotter/views.py b/aloha/allotter/views.py
index 6dad9c4..ab4232a 100644
--- a/aloha/allotter/views.py
+++ b/aloha/allotter/views.py
@@ -42,7 +42,7 @@ def user_login(request):
if form.is_valid():
user = form.cleaned_data
login(request, user)
- status = user.get_profile().application.submitted #Getting the submission status
+ status = user.get_profile().application.submitted #Getting the submission status
if status:
return HttpResponseRedirect(reverse('allotter.views.complete_allotment', args=(user.username,)))
else:
@@ -62,7 +62,10 @@ def submit_details(request, reg_no):
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():
@@ -74,7 +77,7 @@ def submit_details(request, reg_no):
else:
form = UserDetailsForm(request.user)
- context = {"form": form}
+ context = {"form": form, "cat_flag": cat_flag}
return render(request, 'allotter/details.html', context)
def get_details(user, error_message = ""):