From 18364eb53122c2d9ac8c4aed1b91eebe7a577f38 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jon=C3=A1=C5=A1=20Havelka?= Date: Sun, 4 Aug 2024 19:15:15 +0200 Subject: [PATCH] seminar/static --- .../static/personalni}/lisak.pdf | Bin .../static/personalni}/no-photo.png | Bin personalni/templates/personalni/organizatori.html | 2 +- personalni/views.py | 2 +- .../static/soustredeni}/logomm.pdf | Bin soustredeni/views.py | 2 +- .../images => tvorba/static/tvorba}/no-picture.png | Bin .../static/tvorba}/tema-bez-obrazku.png | Bin tvorba/templates/tvorba/archiv/rocnik.html | 4 ++-- tvorba/templates/tvorba/tematka/rozcestnik.html | 2 +- tvorba/views/views_all.py | 2 +- 11 files changed, 7 insertions(+), 7 deletions(-) rename {seminar/static/seminar => personalni/static/personalni}/lisak.pdf (100%) rename {seminar/static/images => personalni/static/personalni}/no-photo.png (100%) rename {seminar/static/images => soustredeni/static/soustredeni}/logomm.pdf (100%) rename {seminar/static/images => tvorba/static/tvorba}/no-picture.png (100%) rename {seminar/static/images => tvorba/static/tvorba}/tema-bez-obrazku.png (100%) diff --git a/seminar/static/seminar/lisak.pdf b/personalni/static/personalni/lisak.pdf similarity index 100% rename from seminar/static/seminar/lisak.pdf rename to personalni/static/personalni/lisak.pdf diff --git a/seminar/static/images/no-photo.png b/personalni/static/personalni/no-photo.png similarity index 100% rename from seminar/static/images/no-photo.png rename to personalni/static/personalni/no-photo.png diff --git a/personalni/templates/personalni/organizatori.html b/personalni/templates/personalni/organizatori.html index 799bbe49..56fb351e 100644 --- a/personalni/templates/personalni/organizatori.html +++ b/personalni/templates/personalni/organizatori.html @@ -46,7 +46,7 @@ {% if org.osoba.foto %} {{org.osoba.jmeno}} {{org.osoba.prijmeni}} {% else %} {# pokud osoba nemá fotku, zobrazuje se defaultní obrázek #} - {% load static %} {{org.osoba.jmeno}} {{org.osoba.prijmeni}} + {% load static %} {{org.osoba.jmeno}} {{org.osoba.prijmeni}} {% endif %} diff --git a/personalni/views.py b/personalni/views.py index a4c410be..12768c34 100644 --- a/personalni/views.py +++ b/personalni/views.py @@ -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: diff --git a/seminar/static/images/logomm.pdf b/soustredeni/static/soustredeni/logomm.pdf similarity index 100% rename from seminar/static/images/logomm.pdf rename to soustredeni/static/soustredeni/logomm.pdf diff --git a/soustredeni/views.py b/soustredeni/views.py index 4b8fb91f..bbcf67c4 100644 --- a/soustredeni/views.py +++ b/soustredeni/views.py @@ -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: diff --git a/seminar/static/images/no-picture.png b/tvorba/static/tvorba/no-picture.png similarity index 100% rename from seminar/static/images/no-picture.png rename to tvorba/static/tvorba/no-picture.png diff --git a/seminar/static/images/tema-bez-obrazku.png b/tvorba/static/tvorba/tema-bez-obrazku.png similarity index 100% rename from seminar/static/images/tema-bez-obrazku.png rename to tvorba/static/tvorba/tema-bez-obrazku.png diff --git a/tvorba/templates/tvorba/archiv/rocnik.html b/tvorba/templates/tvorba/archiv/rocnik.html index fd2a99b6..9e070e82 100644 --- a/tvorba/templates/tvorba/archiv/rocnik.html +++ b/tvorba/templates/tvorba/archiv/rocnik.html @@ -34,7 +34,7 @@ {% if c.titulka_nahled %} {{ c.kod }} {% else %} - {% load static %} no-picture + {% load static %} no-picture {% endif %} @@ -80,7 +80,7 @@ {% if c.titulka_nahled %} {{ c.kod }} {% else %} - {% load static %} no-picture + {% load static %} no-picture {% endif %} diff --git a/tvorba/templates/tvorba/tematka/rozcestnik.html b/tvorba/templates/tvorba/tematka/rozcestnik.html index 605a6549..fcfba59e 100644 --- a/tvorba/templates/tvorba/tematka/rozcestnik.html +++ b/tvorba/templates/tvorba/tematka/rozcestnik.html @@ -35,7 +35,7 @@ {% if tematko.obrazek %} {{ tematko.nazev }} {% else %} {# pokud témátko nemá fotku, zobrazuje se defaultní obrázek #} - {% load static %} {{ tematko.nazev }} + {% load static %} {{ tematko.nazev }} {% endif %} diff --git a/tvorba/views/views_all.py b/tvorba/views/views_all.py index ac8b5477..b4bbad92 100644 --- a/tvorba/views/views_all.py +++ b/tvorba/views/views_all.py @@ -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