tituly | view
This commit is contained in:
parent
5ac41bc821
commit
358ecaa1e3
3 changed files with 19 additions and 1 deletions
0
seminar/templates/seminar/archiv/Tituly.tex
Normal file
0
seminar/templates/seminar/archiv/Tituly.tex
Normal file
|
@ -36,5 +36,8 @@ urlpatterns = patterns('',
|
|||
url(r'^aesop-export/mam-sous-(?P<datum_zacatku>[\d-]+)\.csv$', export.ExportSousView.as_view(), name='seminar_export_sous'),
|
||||
url(r'^aesop-export/index.csv$', export.ExportIndexView.as_view(), name='seminar_export_index'),
|
||||
url(r'^cislo/(?P<rocnik>\d+).(?P<cislo>\d+)/vysledkovka.tex$', views.CisloVysledkovkaView.as_view(), name='seminar_cislo_vysledkovka'),
|
||||
url(r'^cislo/(?P<rocnik>\d+).(?P<cislo>\d+)/obalky.pdf$',views.cisloObalkyView, name='seminar_cislo_obalky')
|
||||
url(r'^cislo/(?P<rocnik>\d+).(?P<cislo>\d+)/obalky.pdf$',views.cisloObalkyView, name='seminar_cislo_obalky'),
|
||||
|
||||
url(r'^cislo/(?P<rocnik>\d+).(?P<cislo>\d+)/tituly.tex$', views.TitulyView,
|
||||
name='seminar_cislo_titul'),
|
||||
)
|
||||
|
|
|
@ -380,6 +380,21 @@ def obalkyView(request,resitele):
|
|||
shutil.rmtree(tempdir)
|
||||
return response
|
||||
|
||||
### Tituly
|
||||
|
||||
def TitulyView(request, rocnik, cislo):
|
||||
resitele = Resitel.objects.all()
|
||||
for resitel in resitele:
|
||||
rocnik_obj = Rocnik.objects.filter(rocnik = rocnik)
|
||||
cislo_obj = Cislo.objects.filter(rocnik = rocnik_obj, cislo = cislo).first()
|
||||
body = VysledkyKCisluOdjakziva.objects.filter(resitel = resitel, cislo = cislo_obj).first().body
|
||||
resitel.titul = resitel.get_titul(body)
|
||||
|
||||
return render(request, 'seminar/archiv/Tituly.tex',
|
||||
{'resitele': resitele,
|
||||
}
|
||||
)
|
||||
|
||||
|
||||
### Soustredeni
|
||||
|
||||
|
|
Loading…
Reference in a new issue