Opraveno generovani obalek.
This commit is contained in:
parent
b440cb680a
commit
9510c1d387
2 changed files with 9 additions and 5 deletions
|
@ -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}
|
||||
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue