quiz/views.py
changeset 29 ea1c0110e989
parent 24 2368bb63ee39
child 33 d28d0957a5ab
--- a/quiz/views.py	Wed Apr 21 11:08:44 2010 +0530
+++ b/quiz/views.py	Wed Apr 21 12:11:19 2010 +0530
@@ -153,7 +153,8 @@
         else:
             return redirect('/quiz/answer/%s'%quiz.key)
     else:
-        return render_to_response('display_question.html', {'question':question})
+        options = [ _.strip() for _ in question.options.split('\n') ] if question.options else []
+        return render_to_response('display_question.html', {'question':question, 'options':options})
 
 def quiz_complete(request):
     """ display thanq and log the user out.