]> git.parisson.com Git - django_quiz.git/commitdiff
cleaning up templates
authorTom Walker <tomwalker0472@gmail.com>
Sun, 20 Jul 2014 15:21:09 +0000 (16:21 +0100)
committerTom Walker <tomwalker0472@gmail.com>
Sun, 20 Jul 2014 15:21:09 +0000 (16:21 +0100)
quiz/templates/base.html
quiz/templates/progress.html
quiz/templates/question.html
quiz/templates/quiz/category_list.html
quiz/templates/quiz/quiz_list.html
quiz/templates/result.html
quiz/templates/signup.html [deleted file]
quiz/templates/single_complete.html
quiz/templates/view_quiz_category.html
quiz/templatetags/quiz_tags.py

index de93368f6ca79d2d8ff421dfc703c0b47f13d8d5..aa953aa364827312db7e11c559616472110aa9d5 100644 (file)
@@ -1,3 +1,4 @@
+
 <!DOCTYPE html>
 <html xmlns:fb="http://www.facebook.com/2008/fbml" xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en" dir="ltr">
 <head>
 
 <!-- Before the quiz content -->
 
+<div class="container">
+
 {% block content %}
 
 {% endblock %}
 
+</div>
+
 <!-- After the quiz content -->
 
 
index 224d0e5283d929e346fb9e3963f82ab54285dadf..44b201087b87537f63c25b495323aeea8c30b21c 100644 (file)
@@ -7,8 +7,6 @@
 
 {% block content %}
 
-<div class="container">
-
   {% if cat_scores %}
 
   <h1>Question Category Scores</h1>
@@ -83,6 +81,5 @@
 
   {% endif %}
 
-</div>
 
 {% endblock %}
index 8044515e9bc373af38b7bf974ae5739368aedb27..325c37d94f0cd4430f3d6b74e693bfa660a722f6 100644 (file)
@@ -7,9 +7,6 @@
 
 {% block content %}
 
-<div class="container">
-
-
 {% if previous %}
 
   <p class="muted"><small>The previous question:</small></p>
@@ -69,6 +66,6 @@
 {% endif %}
 
 <hr>
-       </div>
+
 
 {% endblock %}
index 3963805e3878e9af197898af3bde315f2d6c1d4e..c58cd057d87b089ca8bad045dbe53e4d1ca35a10 100644 (file)
@@ -5,7 +5,7 @@
 <h2>Category list</h2>
 
 <ul>
-  {% for cat in object_list %}
+  {% for cat in category_list %}
   <li>
        <a href="{% url 'quiz_category_list_matching' category_name=cat.category %}">
          {{ cat.category }}
@@ -15,7 +15,3 @@
 </ul>
 
 {% endblock %}
-
-{% block right-sidebar %}
-<h2>Sponsored Advertisements</h2>
-{% endblock %}
index 39f97581f6dead4a99a1fc37317b7ed8da8e2845..f0e0fda6995364687e5f7a3ca8d02d133ae2ebe9 100644 (file)
@@ -2,7 +2,7 @@
 {% block title %}All Quizzes{% endblock %}
 
 {% block content %}
-<h2>Quiz list</h2>
+<h2>List of quizzes</h2>
     {% if quiz_list %}
         <ul>
         {% for quiz in quiz_list %}
@@ -13,7 +13,3 @@
         <p>There are no available quizzes.</p>
     {% endif %}
 {% endblock %}
-
-{% block right-sidebar %}
-<h2>Sponsored Advertisements</h2>
-{% endblock %}
index ca9ecb7167f1ccc9ff1ed4c83e79f2597a5c83f7..20e2021f1ae4cea0cefdd43ec520407ee1e70c8f 100644 (file)
@@ -2,13 +2,11 @@
 
 {% load quiz_tags %}
 
-{% block title %} Exam Paper Result {% endblock %}
-{% block description %} Exam Results {% endblock %}
+{% block title %} {{ quiz.title}} {% endblock %}
+{% block description %} Exam Results for {{ quiz.title }} {% endblock %}
 
 {% block content %}
 
-<div class="container">
-
   {% if previous %}
 
   <p class="muted"><small>The previous question:</small></p>
@@ -86,7 +84,4 @@
   {% endif %}
 
 
-
-</div>
-
 {% endblock %}
diff --git a/quiz/templates/signup.html b/quiz/templates/signup.html
deleted file mode 100644 (file)
index dbdcaad..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-{% extends 'base.html' %}
-{% block title %}Progress{% endblock %}
-
-{% block content %}
-<h1>Sign up</h1>
-
-<p>Your current score is {{ anon_score }} out of {{ anon_possible }}</p>
-
-{% endblock %}
index 2c5e50c91fb6e1cfcbe06e60ee30d643cab20d86..6856a70504309689b41371bb81af61fd76680c8e 100644 (file)
@@ -7,7 +7,6 @@
 
 {% block content %}
 
-<div class="container">
 
 {% if user.is_authenticated %}
   <p>You have already sat this exam and only one sitting is permitted.</p>
@@ -15,6 +14,5 @@
   <p>This exam is only accessible to signed in users.</p>
 {% endif %}
 
-</div>
 
 {% endblock %}
index 9d9d555c01d6265dda7b1fb5256cb9922c2bd6a8..067cbbbbef81254610db1816e40fd7fd17466b77 100644 (file)
@@ -2,7 +2,7 @@
 {% block title %}Quizzes related to {{ category.category }}{% endblock %}
 
 {% block content %}
-<h1>Quizzes in {{ category.category }}</h1>
+<h1>Quizzes in the <strong>{{ category.category }} </strong>category</h1>
 
   {% with object_list as quizzes %}
     {% if quizzes %}
index d4dac7d53b2c31b77685a0a4b1661666a720befc..e0715c4e7b246d9b31255f1992f98e2d78755b03 100644 (file)
@@ -15,7 +15,6 @@ def correct_answer_for_all(context, question):
         user_was_incorrect = True
     else:
         user_was_incorrect = False
-    previous = {'answers': answers}
 
-    return {'previous': previous,
+    return {'previous': {'answers': answers},
             'user_was_incorrect': user_was_incorrect}