created the view to display questions
authornishanth
Thu, 01 Jul 2010 16:01:48 +0530
changeset 78 2264a51fc9cf
parent 77 7315ee25bf83
child 79 fa10c32b3730
created the view to display questions
event/views.py
--- a/event/views.py	Thu Jul 01 16:04:09 2010 +0530
+++ b/event/views.py	Thu Jul 01 16:01:48 2010 +0530
@@ -197,3 +197,11 @@
         return redirect("/quiz/toppers/%s/%s"%(ADMIN_KEY, quiz_num))
     else:
         return render_to_response("que_dump.html", {"quiz_name":quiz_name, "question":question, "answers":answers})
+
+def list_questions(request):
+    """ Display all the questions in a list.
+    """
+
+    questions = QuestionBank.objects.all()
+    return render_to_response("list_questions.html", {"questions":questions})
+