Browse Source

tituly | view

remotes/origin/imagekit
Bc. Petr Pecha 9 years ago
parent
commit
358ecaa1e3
  1. 0
      seminar/templates/seminar/archiv/Tituly.tex
  2. 5
      seminar/urls.py
  3. 15
      seminar/views.py

0
seminar/templates/seminar/archiv/Tituly.tex

5
seminar/urls.py

@ -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/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'^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+)/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'),
) )

15
seminar/views.py

@ -380,6 +380,21 @@ def obalkyView(request,resitele):
shutil.rmtree(tempdir) shutil.rmtree(tempdir)
return response 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 ### Soustredeni

Loading…
Cancel
Save