Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

attempt fix scheduler, placebo register button added

  • Loading branch information...
commit 8e56676c179e5cd78d554c71159a374104e43292 1 parent e7b80cf
@ngokevin ngokevin authored
View
BIN  scheduler/templates/scheduler/.index.html.swp
Binary file not shown
View
8 scheduler/scheduler/index.html → scheduler/templates/scheduler/index.html
@@ -107,6 +107,7 @@
{% endifequal %}
Combination {{forloop.counter}}
</h4>
+
<table>
<tr>
<th>Class</th>
@@ -130,10 +131,13 @@
<td>TBA</td>
{% endifnotequal %}
<td>{{course.crn}}</td>
- </tr>
+ </tr>
{% endfor %}
-
</table>
+ <form action='.' method='POST'>
+ <input type="hidden" name="courses" value="{{combination}}" />
+ <input type="submit" name="register" value="Register" />
+ </form>
<br/>
</div>
{% endfor %}
View
14 scheduler/views.py
@@ -10,6 +10,16 @@ def index(request):
if request.method == 'GET':
return render_to_response('scheduler/index.html')
+
+ # if user chose to register a list of courses
+ try:
+ if request.session['courses']:
+ register(courses)
+ del(request.session['courses'])
+ return render_to_response('scheduler/index.html')
+ except:
+ pass
+
regclass = request.session['regclass']
#try:
classes = request.POST['classes'].split(', ')
@@ -23,3 +33,7 @@ def index(request):
return render_to_response('scheduler/index.html', {'combinations':combinations, 'json':combinations_json, 'range':range(24), 'classes_possible':classes_possible})
+def register(courses):
+ print courses
+
+

0 comments on commit 8e56676

Please sign in to comment.
Something went wrong with that request. Please try again.