Přidány templates (hodně základní, jen abych věděl, že to něco dělá)
This commit is contained in:
parent
8145932942
commit
fd754394c2
4 changed files with 44 additions and 4 deletions
7
seminar/templates/seminar/odevzdavatko/detail.html
Normal file
7
seminar/templates/seminar/odevzdavatko/detail.html
Normal file
|
@ -0,0 +1,7 @@
|
|||
{% extends "base.html" %}
|
||||
|
||||
{% block content %}
|
||||
|
||||
{{ object }}
|
||||
|
||||
{% endblock %}
|
11
seminar/templates/seminar/odevzdavatko/seznam.html
Normal file
11
seminar/templates/seminar/odevzdavatko/seznam.html
Normal file
|
@ -0,0 +1,11 @@
|
|||
{% extends "base.html" %}
|
||||
|
||||
{% block content %}
|
||||
|
||||
<ul>
|
||||
{% for obj in object_list %}
|
||||
<li> {{ obj }}
|
||||
{% endfor %}
|
||||
</ul>
|
||||
|
||||
{% endblock %}
|
22
seminar/templates/seminar/odevzdavatko/tabulka.html
Normal file
22
seminar/templates/seminar/odevzdavatko/tabulka.html
Normal file
|
@ -0,0 +1,22 @@
|
|||
{% extends "base.html" %}
|
||||
|
||||
{% block content %}
|
||||
|
||||
<table>
|
||||
<tr>
|
||||
<td></td> {# Prázdná buňka v levém horním rohu #}
|
||||
{% for p in problemy %}
|
||||
<th> {{ p }} </th>
|
||||
{% endfor %}
|
||||
</tr>
|
||||
{% for resitel, vysledky in radky %}
|
||||
<tr>
|
||||
<td> {{ resitel } </td>
|
||||
{% for vysl in vysledky %}
|
||||
<td> {{ vysl.pocet_reseni }} řešení, dohromady za {{ vysl.body }}, nejnovější z {{ vysl.posledni_odevzdani }} </td>
|
||||
{% endfor %}
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</table>
|
||||
|
||||
{% endblock %}
|
|
@ -27,7 +27,7 @@ class SouhrnReseni:
|
|||
|
||||
|
||||
class TabulkaOdevzdanychReseniView(TemplateView):
|
||||
template_name = 'TODO'
|
||||
template_name = 'seminar/odevzdavatko/tabulka.html'
|
||||
|
||||
def get_context_data(self, *args, **kwargs):
|
||||
akt_rocnik = m.Nastaveni.get_solo().aktualni_rocnik # .get_solo() vrátí tu jedinou instanci, asi...
|
||||
|
@ -73,7 +73,7 @@ class TabulkaOdevzdanychReseniView(TemplateView):
|
|||
|
||||
class ReseniProblemuView(ListView):
|
||||
model = m.Reseni
|
||||
template_name = 'TODO'
|
||||
template_name = 'seminar/odevzdavatko/seznam.html'
|
||||
|
||||
def get_queryset(self):
|
||||
qs = super().get_queryset()
|
||||
|
@ -96,14 +96,14 @@ class ReseniProblemuView(ListView):
|
|||
|
||||
class DetailReseniView(DetailView):
|
||||
model = m.Reseni
|
||||
template_name = 'TODO'
|
||||
template_name = 'seminar/odevzdavatko/detail.html'
|
||||
# To je všechno? Najde se to podle pk...
|
||||
|
||||
# Přehled všech řešení kvůli debugování
|
||||
|
||||
class SeznamReseniView(ListView):
|
||||
model = m.Reseni
|
||||
template_name = 'TODO'
|
||||
template_name = 'seminar/odevzdavatko/seznam.html'
|
||||
|
||||
class SeznamAktualnichReseniView(SeznamReseniView):
|
||||
def get_queryset(self):
|
||||
|
|
Loading…
Reference in a new issue