fnp
/
koed-quiz.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
wsgi fix
[koed-quiz.git]
/
apps
/
quiz
/
views.py
diff --git
a/apps/quiz/views.py
b/apps/quiz/views.py
index
7160759
..
037f0c5
100644
(file)
--- a/
apps/quiz/views.py
+++ b/
apps/quiz/views.py
@@
-47,6
+47,14
@@
def result(request, slug=None):
ticket = request.session['ticket']
valid = request.path in ticket
ticket = request.session['ticket']
valid = request.path in ticket
+ if valid:
+ cur_index = ticket.index(request.path)
+ if cur_index:
+ previous_url = ticket[cur_index - 1]
+ else:
+ valid_url = ticket[-1]
+
+
result = get_object_or_404(Quiz.current().result_set, slug=slug)
return render(request, "quiz/result_detail.html", locals())
result = get_object_or_404(Quiz.current().result_set, slug=slug)
return render(request, "quiz/result_detail.html", locals())