seminar/static

This commit is contained in:
Jonas Havelka 2024-08-04 19:15:15 +02:00
parent 95ab0ee1dc
commit 18364eb531
11 changed files with 7 additions and 7 deletions

View file

Before

Width:  |  Height:  |  Size: 2.9 KiB

After

Width:  |  Height:  |  Size: 2.9 KiB

View file

@ -46,7 +46,7 @@
{% if org.osoba.foto %}
<a href="{{org.osoba.foto.url}}" class="ref-org-foto"><img src="{{org.osoba.foto_male.url}}" height="{{org.osoba.foto_male.height}}" alt="{{org.osoba.jmeno}} {{org.osoba.prijmeni}}"></a>
{% else %} {# pokud osoba nemá fotku, zobrazuje se defaultní obrázek #}
{% load static %} <img src="{% static 'images/no-photo.png' %}" height=200px alt="{{org.osoba.jmeno}} {{org.osoba.prijmeni}}">
{% load static %} <img src="{% static 'personalni/no-photo.png' %}" height=200px alt="{{org.osoba.jmeno}} {{org.osoba.prijmeni}}">
{% endif %}
</div>

View file

@ -76,7 +76,7 @@ def obalkyView(request, resitele):
with tempfile.TemporaryDirectory() as tempdir:
with open(tempdir+"/obalky.tex", "w") as texfile:
texfile.write(tex.decode())
shutil.copy(find('seminar/lisak.pdf'), tempdir)
shutil.copy(find('personalni/lisak.pdf'), tempdir)
subprocess.call(["pdflatex", "obalky.tex"], cwd=tempdir)
with open(tempdir+"/obalky.pdf", "rb") as pdffile:

View file

@ -93,7 +93,7 @@ def soustredeniStvrzenkyView(request, soustredeni):
with open(tempdir / "stvrzenky.tex", "w") as texfile:
texfile.write(tex.decode())
shutil.copy(find('images/logomm.pdf'), tempdir)
shutil.copy(find('soustredeni/logomm.pdf'), tempdir)
subprocess.call(["pdflatex", "stvrzenky.tex"], cwd = tempdir, stdout=subprocess.DEVNULL)
with open(tempdir / "stvrzenky.pdf", "rb") as pdffile:

View file

Before

Width:  |  Height:  |  Size: 86 KiB

After

Width:  |  Height:  |  Size: 86 KiB

View file

Before

Width:  |  Height:  |  Size: 300 KiB

After

Width:  |  Height:  |  Size: 300 KiB

View file

@ -34,7 +34,7 @@
{% if c.titulka_nahled %}
<img src="{{ c.titulka_nahled.url }}" alt="{{ c.kod }}" height=180px>
{% else %}
{% load static %} <img src="{% static 'images/no-picture.png' %}" height=180px alt="no-picture">
{% load static %} <img src="{% static 'tvorba/no-picture.png' %}" height=180px alt="no-picture">
{% endif %}
</div>
@ -80,7 +80,7 @@
{% if c.titulka_nahled %}
<img src="{{ c.titulka_nahled.url }}" alt="{{ c.kod }}" height=180px>
{% else %}
{% load static %} <img src="{% static 'images/no-picture.png' %}" height=180px alt="no-picture">
{% load static %} <img src="{% static 'tvorba/no-picture.png' %}" height=180px alt="no-picture">
{% endif %}
</div>

View file

@ -35,7 +35,7 @@
{% if tematko.obrazek %}
<img src="{{ tematko.obrazek.url }}" alt="{{ tematko.nazev }}">
{% else %} {# pokud témátko nemá fotku, zobrazuje se defaultní obrázek #}
{% load static %} <img src="{% static 'images/tema-bez-obrazku.png' %}" alt="{{ tematko.nazev }}">
{% load static %} <img src="{% static 'tvorba/tema-bez-obrazku.png' %}" alt="{{ tematko.nazev }}">
{% endif %}
</div>
</div>

View file

@ -237,7 +237,7 @@ class ArchivView(generic.ListView):
for i, c in enumerate(cisla):
# Výchozí nastavení
if c.rocnik not in urls:
urls[c.rocnik] = op.join(settings.STATIC_URL, "images", "no-picture.png")
urls[c.rocnik] = op.join(settings.STATIC_URL, "tvorba", "no-picture.png")
# NOTE: tohle možná nastavuje poslední titulku
if c.titulka_nahled:
urls[c.rocnik] = c.titulka_nahled.url