Browse Source

Zaklad routovani / view pro soustredeni

remotes/origin/feincms
Tomas Gavenciak 10 years ago
parent
commit
32cb4b1480
  1. 2
      seminar/urls.py
  2. 6
      seminar/views.py

2
seminar/urls.py

@ -5,6 +5,8 @@ urlpatterns = patterns('',
url(r'^rocnik/(?P<pk>\d+)/$', views.RocnikView.as_view(), name='seminar_rocnik'), url(r'^rocnik/(?P<pk>\d+)/$', views.RocnikView.as_view(), name='seminar_rocnik'),
url(r'^cislo/(?P<pk>\d+)/$', views.CisloView.as_view(), name='seminar_cislo'), url(r'^cislo/(?P<pk>\d+)/$', views.CisloView.as_view(), name='seminar_cislo'),
url(r'^problem/(?P<pk>\d+)/$', views.ProblemView.as_view(), name='seminar_problem'), url(r'^problem/(?P<pk>\d+)/$', views.ProblemView.as_view(), name='seminar_problem'),
url(r'^soustredeni/(?P<pk>\d+)/$', views.SoustredeniView.as_view(), name='seminar_soustredeni'),
url(r'^zadani/$', views.AktualniZadaniView, name='seminar_aktualni_zadani'), url(r'^zadani/$', views.AktualniZadaniView, name='seminar_aktualni_zadani'),
url(r'^aesop-export/mam-rocnik-(?P<prvni_rok>\d+)\.csv$', export.ExportRocnikView.as_view(), name='seminar_export_rocnik'), url(r'^aesop-export/mam-rocnik-(?P<prvni_rok>\d+)\.csv$', export.ExportRocnikView.as_view(), name='seminar_export_rocnik'),

6
seminar/views.py

@ -2,7 +2,7 @@ from django.shortcuts import get_object_or_404, render
from django.http import HttpResponseRedirect from django.http import HttpResponseRedirect
from django.core.urlresolvers import reverse from django.core.urlresolvers import reverse
from django.views import generic from django.views import generic
from .models import Problem, Cislo, Reseni, VysledkyKCislu, Nastaveni, Rocnik from .models import Problem, Cislo, Reseni, VysledkyKCislu, Nastaveni, Rocnik, Soustredeni
def AktualniZadaniView(request): def AktualniZadaniView(request):
@ -16,6 +16,10 @@ class RocnikView(generic.DetailView):
model = Rocnik model = Rocnik
template_name = 'seminar/rocnik.html' template_name = 'seminar/rocnik.html'
class SoustredeniView(generic.DetailView):
model = Soustredeni
template_name = 'seminar/soustredeni.html'
class ProblemView(generic.DetailView): class ProblemView(generic.DetailView):
model = Problem model = Problem
template_name = 'seminar/problem.html' template_name = 'seminar/problem.html'

Loading…
Cancel
Save