# HG changeset patch # User nishanth # Date 1277980308 -19800 # Node ID 2264a51fc9cfbb4023a00c652d06e23799ca7e2e # Parent 7315ee25bf832f875810e4dbd90452d334323965 created the view to display questions diff -r 7315ee25bf83 -r 2264a51fc9cf 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}) +