From e7e608617d0c8b412c884a8aa615a337421555d8 Mon Sep 17 00:00:00 2001 From: "Bc. Petr Pecha" Date: Thu, 4 Jun 2015 10:57:19 +0200 Subject: [PATCH] Premisteni templatu archivu do podadresare --- seminar/templates/seminar/archiv/base.html | 6 ++++++ seminar/templates/seminar/archiv/cisla.html | 2 +- seminar/templates/seminar/{ => archiv}/cislo.html | 2 +- seminar/templates/seminar/{ => archiv}/problem.html | 2 +- seminar/templates/seminar/{ => archiv}/rocnik.html | 2 +- seminar/templates/seminar/clanky/base.html | 6 ++++++ seminar/templates/seminar/cojemam/base.html | 6 ++++++ seminar/templates/seminar/cojemam/organizatori.html | 6 +----- seminar/templates/seminar/soustredeni/base.html | 6 ++++++ .../templates/seminar/{ => zadani}/AktualniZadani.html | 2 +- seminar/templates/seminar/zadani/base.html | 6 ++++++ seminar/views.py | 10 +++++----- 12 files changed, 41 insertions(+), 15 deletions(-) create mode 100644 seminar/templates/seminar/archiv/base.html rename seminar/templates/seminar/{ => archiv}/cislo.html (96%) rename seminar/templates/seminar/{ => archiv}/problem.html (95%) rename seminar/templates/seminar/{ => archiv}/rocnik.html (88%) create mode 100644 seminar/templates/seminar/clanky/base.html create mode 100644 seminar/templates/seminar/cojemam/base.html create mode 100644 seminar/templates/seminar/soustredeni/base.html rename seminar/templates/seminar/{ => zadani}/AktualniZadani.html (89%) create mode 100644 seminar/templates/seminar/zadani/base.html diff --git a/seminar/templates/seminar/archiv/base.html b/seminar/templates/seminar/archiv/base.html new file mode 100644 index 00000000..2eb6110a --- /dev/null +++ b/seminar/templates/seminar/archiv/base.html @@ -0,0 +1,6 @@ +{% extends "base.html" %} + +{% block submenu %} + {% include "seminar/archiv/submenu.html" %} +{% endblock %} + diff --git a/seminar/templates/seminar/archiv/cisla.html b/seminar/templates/seminar/archiv/cisla.html index 46760288..6036300c 100644 --- a/seminar/templates/seminar/archiv/cisla.html +++ b/seminar/templates/seminar/archiv/cisla.html @@ -1,4 +1,4 @@ -{% extends "base.html" %} +{% extends "seminar/archiv/base.html" %} {% block submenu %} {% include "seminar/archiv/submenu.html" %} diff --git a/seminar/templates/seminar/cislo.html b/seminar/templates/seminar/archiv/cislo.html similarity index 96% rename from seminar/templates/seminar/cislo.html rename to seminar/templates/seminar/archiv/cislo.html index cec05a88..1148dd34 100644 --- a/seminar/templates/seminar/cislo.html +++ b/seminar/templates/seminar/archiv/cislo.html @@ -1,4 +1,4 @@ -{% extends "base.html" %} +{% extends "seminar/archiv/base.html" %} {% block content %}
diff --git a/seminar/templates/seminar/problem.html b/seminar/templates/seminar/archiv/problem.html similarity index 95% rename from seminar/templates/seminar/problem.html rename to seminar/templates/seminar/archiv/problem.html index bcec4b93..da7ddab3 100644 --- a/seminar/templates/seminar/problem.html +++ b/seminar/templates/seminar/archiv/problem.html @@ -1,4 +1,4 @@ -{% extends "base.html" %} +{% extends "seminar/archiv/base.html" %} {% load comments %} diff --git a/seminar/templates/seminar/rocnik.html b/seminar/templates/seminar/archiv/rocnik.html similarity index 88% rename from seminar/templates/seminar/rocnik.html rename to seminar/templates/seminar/archiv/rocnik.html index 5bf2852b..329941e8 100644 --- a/seminar/templates/seminar/rocnik.html +++ b/seminar/templates/seminar/archiv/rocnik.html @@ -1,4 +1,4 @@ -{% extends "base.html" %} +{% extends "seminar/archiv/base.html" %} {% block content %}
diff --git a/seminar/templates/seminar/clanky/base.html b/seminar/templates/seminar/clanky/base.html new file mode 100644 index 00000000..8698808e --- /dev/null +++ b/seminar/templates/seminar/clanky/base.html @@ -0,0 +1,6 @@ +{% extends "base.html" %} + +{% block submenu %} + {% include "seminar/clanky/submenu.html" %} +{% endblock %} + diff --git a/seminar/templates/seminar/cojemam/base.html b/seminar/templates/seminar/cojemam/base.html new file mode 100644 index 00000000..9a9c01c0 --- /dev/null +++ b/seminar/templates/seminar/cojemam/base.html @@ -0,0 +1,6 @@ +{% extends "base.html" %} + +{% block submenu %} + {% include "seminar/cojemam/submenu.html" %} +{% endblock %} + diff --git a/seminar/templates/seminar/cojemam/organizatori.html b/seminar/templates/seminar/cojemam/organizatori.html index d71566bc..5c644f47 100644 --- a/seminar/templates/seminar/cojemam/organizatori.html +++ b/seminar/templates/seminar/cojemam/organizatori.html @@ -1,8 +1,4 @@ -{% extends "base.html" %} - -{% block submenu %} - {% include "seminar/cojemam/submenu.html" %} -{% endblock %} +{% extends "seminar/cojemam/base.html" %} {% block content %}
diff --git a/seminar/templates/seminar/soustredeni/base.html b/seminar/templates/seminar/soustredeni/base.html new file mode 100644 index 00000000..4fb36650 --- /dev/null +++ b/seminar/templates/seminar/soustredeni/base.html @@ -0,0 +1,6 @@ +{% extends "base.html" %} + +{% block submenu %} + {% include "seminar/soustredeni/submenu.html" %} +{% endblock %} + diff --git a/seminar/templates/seminar/AktualniZadani.html b/seminar/templates/seminar/zadani/AktualniZadani.html similarity index 89% rename from seminar/templates/seminar/AktualniZadani.html rename to seminar/templates/seminar/zadani/AktualniZadani.html index ba07d6d8..fb508005 100644 --- a/seminar/templates/seminar/AktualniZadani.html +++ b/seminar/templates/seminar/zadani/AktualniZadani.html @@ -1,4 +1,4 @@ -{% extends "base.html" %} +{% extends "seminar/zadani/base.html" %} {% block content %}
diff --git a/seminar/templates/seminar/zadani/base.html b/seminar/templates/seminar/zadani/base.html new file mode 100644 index 00000000..ba4148aa --- /dev/null +++ b/seminar/templates/seminar/zadani/base.html @@ -0,0 +1,6 @@ +{% extends "base.html" %} + +{% block submenu %} + {% include 'seminar/zadani/submenu.html' %} +{% endblock submenu %} + diff --git a/seminar/views.py b/seminar/views.py index 6637023a..96a89d5e 100644 --- a/seminar/views.py +++ b/seminar/views.py @@ -7,7 +7,7 @@ from .models import Problem, Cislo, Reseni, VysledkyKCislu, Nastaveni, Rocnik, S def AktualniZadaniView(request): nastaveni = get_object_or_404(Nastaveni) - return render(request, 'seminar/AktualniZadani.html', + return render(request, 'seminar/zadani/AktualniZadani.html', {'nastaveni' : nastaveni, }, ) @@ -23,22 +23,22 @@ class CislaView(generic.ListView): class RocnikView(generic.DetailView): model = Rocnik - template_name = 'seminar/rocnik.html' + template_name = 'seminar/archiv/rocnik.html' class SoustredeniView(generic.DetailView): model = Soustredeni - template_name = 'seminar/soustredeni.html' + template_name = 'seminar/archiv/soustredeni.html' class ProblemView(generic.DetailView): model = Problem - template_name = 'seminar/problem.html' + template_name = 'seminar/archiv/problem.html' class RadekVysledkovky(object): pass class CisloView(generic.DetailView): model = Cislo - template_name = 'seminar/cislo.html' + template_name = 'seminar/archiv/cislo.html' def get_context_data(self, **kwargs): context = super(CisloView, self).get_context_data(**kwargs)