diff options
author | Primal Pappachan | 2012-03-19 16:23:59 +0530 |
---|---|---|
committer | Primal Pappachan | 2012-03-19 16:23:59 +0530 |
commit | c78804ce5141565ee0e2a64e7f92aaaa126f30e0 (patch) | |
tree | f6968f28222a821e63bfe3502709199bcc889856 | |
parent | 6bf4281d493fe800451cb818d09686b7e6ce767e (diff) | |
download | aloha-c78804ce5141565ee0e2a64e7f92aaaa126f30e0.tar.gz aloha-c78804ce5141565ee0e2a64e7f92aaaa126f30e0.tar.bz2 aloha-c78804ce5141565ee0e2a64e7f92aaaa126f30e0.zip |
working version of the options submission form and saving onto the database
-rw-r--r-- | allotter/urls.py | 2 | ||||
-rw-r--r-- | allotter/views.py | 3 | ||||
-rw-r--r-- | template/allotter/apply.html | 5 | ||||
-rw-r--r-- | template/base.html | 2 |
4 files changed, 6 insertions, 6 deletions
diff --git a/allotter/urls.py b/allotter/urls.py index 611fb88..aa0d62d 100644 --- a/allotter/urls.py +++ b/allotter/urls.py @@ -5,7 +5,7 @@ urlpatterns = patterns('allotter.views', url(r'^logout/$', 'user_logout'), url(r'^apply/$', 'apply'), url(r'^(?P<reg_no>\w+)/submit/$', 'submit'), #change into numbers - url(r'^(?P<reg_no>\w+)/complete/$', 'complete'), #change into numbers + url(r'^(?P<reg_no>\d+)/complete/$', 'complete'), #change into numbers url(r'^$', 'apply'), #url(r'^quit/$', 'quit'), ) diff --git a/allotter/views.py b/allotter/views.py index d4f1a0a..743c373 100644 --- a/allotter/views.py +++ b/allotter/views.py @@ -4,6 +4,7 @@ from django.shortcuts import render_to_response, get_object_or_404 from django.shortcuts import render, redirect from django.template import RequestContext from django.http import Http404 + #TODO: Remove this if possible from django.http import HttpResponseRedirect from django.core.urlresolvers import reverse @@ -123,7 +124,7 @@ def submit(request, reg_no): user_application.options_selected += options_list user_application.save() return HttpResponseRedirect(reverse('allotter.views.complete', args=(reg_no,))) - return redirect('/allotter/complete/') + #return redirect('/allotter/complete/') #User Application diff --git a/template/allotter/apply.html b/template/allotter/apply.html index c38837a..e1c728d 100644 --- a/template/allotter/apply.html +++ b/template/allotter/apply.html @@ -56,20 +56,19 @@ Listing the options for first test paper. Listing the options for second test paper if it exists. {% endcomment %} -{% comment %} + {% if np == 2 %} {% for option in options_available_second %} <p>{{ option.opt_name }}</p> {% for i in oafl|get_range %} - <input name="option" type="radio" value="{{i}}" />{{i}}<br/> + <input name="option" type="radio" value="{{i}}"/><br/> {% endfor %} <input name="option" type="radio" value="None" />None<br/> {% endfor %} {% endif %} -{% endcomment %} <input type="submit" name="save" value="Save" /> </form> diff --git a/template/base.html b/template/base.html index d10402c..cd937ba 100644 --- a/template/base.html +++ b/template/base.html @@ -7,7 +7,7 @@ border: 2px solid red; } </style> - <title>{% block title %}Tagging Exploration{% endblock %}</title> + <title>{% block title %} {% endblock %}</title> </head> <body> |