From 9510c1d3878408741b203786e5b21f90a52ef8e6 Mon Sep 17 00:00:00 2001 From: "Tomas \"Jethro\" Pokorny" Date: Thu, 25 Jul 2019 21:15:48 +0200 Subject: [PATCH 1/4] Opraveno generovani obalek. --- seminar/templates/seminar/archiv/obalky.tex | 12 ++++++++---- seminar/views.py | 2 +- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/seminar/templates/seminar/archiv/obalky.tex b/seminar/templates/seminar/archiv/obalky.tex index 4995d105..ea20f63d 100644 --- a/seminar/templates/seminar/archiv/obalky.tex +++ b/seminar/templates/seminar/archiv/obalky.tex @@ -96,25 +96,29 @@ {% for r in resitele %} + {% with o=r.osoba %} + {% with s=r.osoba.skola %} {% spaceless %} {% if r.zasilat == "do_skoly" %} {% if r.stat == "CZ" %} -\obalka{{r.jmeno|sloz}}{{r.prijmeni|sloz}}{{r.skola.nazev|sloz}}{{r.skola.ulice|sloz}}{{r.skola.psc|sloz}}{{r.skola.mesto|sloz}}{{''|sloz}} +\obalka{{o.jmeno|sloz}}{{o.prijmeni|sloz}}{{s.nazev|sloz}}{{s.ulice|sloz}}{{s.psc|sloz}}{{s.mesto|sloz}}{{''|sloz}} {% else %} -\obalka{{r.jmeno|sloz}}{{r.prijmeni|sloz}}{{r.skola.nazev|sloz}}{{r.skola.ulice|sloz}}{{r.skola.psc|sloz}}{{r.skola.mesto|sloz}}{{r.stat.name|sloz}} +\obalka{{o.jmeno|sloz}}{{o.prijmeni|sloz}}{{s.nazev|sloz}}{{s.ulice|sloz}}{{s.psc|sloz}}{{s.mesto|sloz}}{{o.stat.name|sloz}} {% endif %} {% elif r.zasilat == "domu" %} {% if r.stat == "CZ" %} -\obalka{{r.jmeno|sloz}}{{r.prijmeni|sloz}}{{''|sloz}}{{r.ulice|sloz}}{{r.psc|sloz}}{{r.mesto|sloz}}{{''|sloz}} +\obalka{{o.jmeno|sloz}}{{o.prijmeni|sloz}}{{''|sloz}}{{o.ulice|sloz}}{{o.psc|sloz}}{{o.mesto|sloz}}{{''|sloz}} {% else %} -\obalka{{r.jmeno|sloz}}{{r.prijmeni|sloz}}{{''|sloz}}{{r.ulice|sloz}}{{r.psc|sloz}}{{r.mesto|sloz}}{{r.stat.name|sloz}} +\obalka{{o.jmeno|sloz}}{{o.prijmeni|sloz}}{{''|sloz}}{{o.ulice|sloz}}{{o.psc|sloz}}{{o.mesto|sloz}}{{o.stat.name|sloz}} {% endif %} {% else %} % zasilat: {{r.zasilat}} %\obalka{{r.jmeno|sloz}}{{r.prijmeni|sloz}}{{''|sloz}}{{r.ulice|sloz}}{{r.psc|sloz}}{{r.mesto|sloz}}{{r.stat.name|sloz}} {% endif %} {% endspaceless %} + {% endwith %} + {% endwith %} {% endfor %} \end{document} diff --git a/seminar/views.py b/seminar/views.py index 7ac0701e..0829711a 100644 --- a/seminar/views.py +++ b/seminar/views.py @@ -524,7 +524,7 @@ def obalkyView(request,resitele): tex = render(request,'seminar/archiv/obalky.tex', {'resitele': resitele}).content tempdir = tempfile.mkdtemp() - with open(tempdir+"/obalky.tex","w") as texfile: + with open(tempdir+"/obalky.tex","wb") as texfile: texfile.write(tex) shutil.copy(os.path.join(settings.STATIC_ROOT, 'seminar/lisak.eps'),tempdir) subprocess.call(["pdflatex","obalky.tex"],cwd = tempdir) From 080405a2940c548b0aa0f2b96a4d695a2d6006b0 Mon Sep 17 00:00:00 2001 From: "Tomas \"Jethro\" Pokorny" Date: Thu, 25 Jul 2019 21:34:21 +0200 Subject: [PATCH 2/4] Opravena stara reference na telefonni cislo, zruseny stvrzenky. --- seminar/templates/seminar/soustredeni/seznam_soustredeni.html | 2 +- seminar/templates/seminar/soustredeni/seznam_ucastniku.html | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/seminar/templates/seminar/soustredeni/seznam_soustredeni.html b/seminar/templates/seminar/soustredeni/seznam_soustredeni.html index 538843bd..a607e41e 100644 --- a/seminar/templates/seminar/soustredeni/seznam_soustredeni.html +++ b/seminar/templates/seminar/soustredeni/seznam_soustredeni.html @@ -51,7 +51,7 @@ HTML tabulka pro tisk, CSV, E-maily
- Stvrzenky (42 v URL nahraďte prvním číslem z rozsahu) + {% endif %} diff --git a/seminar/templates/seminar/soustredeni/seznam_ucastniku.html b/seminar/templates/seminar/soustredeni/seznam_ucastniku.html index 346b348b..926b4905 100644 --- a/seminar/templates/seminar/soustredeni/seznam_ucastniku.html +++ b/seminar/templates/seminar/soustredeni/seznam_ucastniku.html @@ -25,7 +25,7 @@ {{sous_ucast.resitel}} {{sous_ucast.resitel.rok_maturity}} - {{sous_ucast.resitel.telefon}} + {{sous_ucast.resitel.osoba.telefon}} {{sous_ucast.poznamka}} From 0a737390b4f610412f7d431cec979ef833687e58 Mon Sep 17 00:00:00 2001 From: "Tomas \"Jethro\" Pokorny" Date: Thu, 25 Jul 2019 22:25:46 +0200 Subject: [PATCH 3/4] Opraveny fluentcomments Nevim, jestli se to nekde skutecne pouziva, ale aspon si to nebude porad stezovat, ze neexistuji. --- mamweb/templates/base.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mamweb/templates/base.html b/mamweb/templates/base.html index 2f5826ef..aeb5f51b 100644 --- a/mamweb/templates/base.html +++ b/mamweb/templates/base.html @@ -13,8 +13,8 @@ {% include 'autocomplete_light/static.html' %} - - + + {# nastavení MathJaxu, aby nahrazoval i matiku obalenou jednoduchými $ #}