From: Tom Walker Date: Fri, 4 Jul 2014 14:33:25 +0000 (+0100) Subject: moved towards CBVs for simples views, next step is to convert complicated views into... X-Git-Url: https://git.parisson.com/?a=commitdiff_plain;h=0733b73040acb07671db25cd4a2cc629020728c5;p=django_quiz.git moved towards CBVs for simples views, next step is to convert complicated views into mix of CBVs and forms with custom validation --- diff --git a/quiz/templates/list_categories.html b/quiz/templates/list_categories.html deleted file mode 100644 index 1ae019b..0000000 --- a/quiz/templates/list_categories.html +++ /dev/null @@ -1,21 +0,0 @@ -{% extends 'base.html' %} -{% block title %}All Quizzes{% endblock %} - -{% block content %} -

Category list

- - - -{% endblock %} - -{% block right-sidebar %} -

Sponsored Advertisements

-{% endblock %} diff --git a/quiz/templates/progress.html b/quiz/templates/progress.html index 32c6902..3912f5f 100644 --- a/quiz/templates/progress.html +++ b/quiz/templates/progress.html @@ -14,10 +14,10 @@
+ +
{% endif %} diff --git a/quiz/templates/quiz/quiz_list.html b/quiz/templates/quiz/quiz_list.html new file mode 100644 index 0000000..a5466ea --- /dev/null +++ b/quiz/templates/quiz/quiz_list.html @@ -0,0 +1,19 @@ +{% extends 'base.html' %} +{% block title %}All Quizzes{% endblock %} + +{% block content %} +

Quiz list

+ {% if quiz_list %} + + {% else %} +

There are no available quizzes.

+ {% endif %} +{% endblock %} + +{% block right-sidebar %} +

Sponsored Advertisements

+{% endblock %} diff --git a/quiz/templates/quiz_index.html b/quiz/templates/quiz_index.html deleted file mode 100644 index a5466ea..0000000 --- a/quiz/templates/quiz_index.html +++ /dev/null @@ -1,19 +0,0 @@ -{% extends 'base.html' %} -{% block title %}All Quizzes{% endblock %} - -{% block content %} -

Quiz list

- {% if quiz_list %} - - {% else %} -

There are no available quizzes.

- {% endif %} -{% endblock %} - -{% block right-sidebar %} -

Sponsored Advertisements

-{% endblock %} diff --git a/quiz/templates/view_quiz_category.html b/quiz/templates/view_quiz_category.html index b60a0c9..9d9d555 100644 --- a/quiz/templates/view_quiz_category.html +++ b/quiz/templates/view_quiz_category.html @@ -4,6 +4,7 @@ {% block content %}

Quizzes in {{ category.category }}

+ {% with object_list as quizzes %} {% if quizzes %}