Merge branch 'data_migrations' of gimli.ms.mff.cuni.cz:/akce/mam/git/mamweb into data_migrations
This commit is contained in:
commit
7086309bc1
6 changed files with 21 additions and 9 deletions
|
@ -13,8 +13,8 @@
|
|||
<script src="{% static 'js/jquery-1.11.1.js' %}"></script>
|
||||
{% include 'autocomplete_light/static.html' %}
|
||||
|
||||
<link rel="stylesheet" type="text/css" href="{{ STATIC_URL }}fluent_comments/css/ajaxcomments.css" />
|
||||
<script type="text/javascript" src="{{ STATIC_URL }}fluent_comments/js/ajaxcomments.js"></script>
|
||||
<link rel="stylesheet" type="text/css" href="{% static 'fluent_comments/css/ajaxcomments.css' %}" />
|
||||
<script type="text/javascript" src="{% static 'fluent_comments/js/ajaxcomments.js' %}"></script>
|
||||
|
||||
{# nastavení MathJaxu, aby nahrazoval i matiku obalenou jednoduchými $ #}
|
||||
<script type="text/x-mathjax-config">
|
||||
|
|
|
@ -1152,6 +1152,14 @@ class TreeNode(models.Model):
|
|||
blank = True,
|
||||
on_delete=models.SET_NULL,
|
||||
verbose_name="další element na stejné úrovni")
|
||||
|
||||
def print_tree(self,indent=0):
|
||||
print("{}TreeNode({})".format(" "*indent,self.id))
|
||||
if self.first_child:
|
||||
self.first_child.print_tree(indent=indent+2)
|
||||
if self.succ:
|
||||
self.succ.print_tree(indent=indent)
|
||||
|
||||
|
||||
class RocnikNode(TreeNode):
|
||||
class Meta:
|
||||
|
|
|
@ -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}
|
||||
|
||||
|
|
|
@ -51,7 +51,7 @@
|
|||
<a href="../{{soustredeni.pk}}/seznam_ucastniku">HTML tabulka pro tisk</a>,
|
||||
<a href="../{{soustredeni.pk}}/export_ucastniku">CSV</a>,
|
||||
<a href="../{{soustredeni.pk}}/maily_ucastniku">E-maily</a><br>
|
||||
<a href="../{{soustredeni.pk}}/stvrzenky/42">Stvrzenky <i>(42 v URL nahraďte prvním číslem z rozsahu)</i></a>
|
||||
<!--a href="../{{soustredeni.pk}}/stvrzenky/42">Stvrzenky <i>(42 v URL nahraďte prvním číslem z rozsahu)</i></a!-->
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
<tr>
|
||||
<td nowrap>{{sous_ucast.resitel}}</td>
|
||||
<td nowrap>{{sous_ucast.resitel.rok_maturity}}</td>
|
||||
<td nowrap>{{sous_ucast.resitel.telefon}}</td>
|
||||
<td nowrap>{{sous_ucast.resitel.osoba.telefon}}</td>
|
||||
<td nowrap>{{sous_ucast.poznamka}}</td>
|
||||
<td class="fill"></td>
|
||||
|
||||
|
|
|
@ -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