Browse Source

Archiv témat

remotes/origin/vysl
Matěj Kocián 9 years ago
parent
commit
25313cb3f3
  1. 12
      seminar/templates/seminar/archiv/temata.html
  2. 1
      seminar/urls.py
  3. 5
      seminar/views.py

12
seminar/templates/seminar/archiv/temata.html

@ -0,0 +1,12 @@
{% extends "seminar/archiv/base.html" %}
{% block content %}
<h2>{% block nadpis1 %} Archiv témat {% endblock %}</h2>
<ul>
{% for tema in object_list %}
<li>
<a href="{{ tema.verejne_url }}">{{ tema.kod_v_rocniku }}: {{ tema.nazev }}</a>
{% endfor %}
{% endblock content %}

1
seminar/urls.py

@ -7,6 +7,7 @@ urlpatterns = patterns('',
url(r'^co-je-MaM/organizatori/organizovali/$', views.CojemamOrganizatoriStariView.as_view(), name='stari_organizatori'), url(r'^co-je-MaM/organizatori/organizovali/$', views.CojemamOrganizatoriStariView.as_view(), name='stari_organizatori'),
url(r'^archiv/cisla/$', views.CislaView.as_view()), url(r'^archiv/cisla/$', views.CislaView.as_view()),
url(r'^archiv/temata/$', views.ArchivTemataView.as_view()),
url(r'^rocnik/(?P<rocnik>\d+)/$', views.RocnikView.as_view(), name='seminar_rocnik'), url(r'^rocnik/(?P<rocnik>\d+)/$', views.RocnikView.as_view(), name='seminar_rocnik'),
url(r'^cislo/(?P<rocnik>\d+)\.(?P<cislo>[0-9-]+)/$', views.CisloView.as_view(), name='seminar_cislo'), url(r'^cislo/(?P<rocnik>\d+)\.(?P<cislo>[0-9-]+)/$', views.CisloView.as_view(), name='seminar_cislo'),

5
seminar/views.py

@ -230,6 +230,11 @@ class CisloView(generic.DetailView):
context['resene_problemy'] = resene_problemy context['resene_problemy'] = resene_problemy
return context return context
class ArchivTemataView(generic.ListView):
model = Problem
template_name = 'seminar/archiv/temata.html'
queryset = Problem.objects.filter(typ=Problem.TYP_TEMA).order_by('cislo_zadani__rocnik__rocnik', 'kod')
### Generovani vysledkovky ### Generovani vysledkovky
class CisloVysledkovkaView(CisloView): class CisloVysledkovkaView(CisloView):

Loading…
Cancel
Save