From ed931a5987f0fc29800a7806a8bb5fa405663ab3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kate=C5=99ina=20=C4=8C=C3=AD=C5=BEkov=C3=A1?= Date: Wed, 25 Mar 2020 21:30:05 +0100 Subject: [PATCH 1/2] =?UTF-8?q?test=20=C3=BAprav=20spir=C3=A1ly=20v=20arch?= =?UTF-8?q?ivu?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- seminar/views.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/seminar/views.py b/seminar/views.py index 3f15fa24..2f3e8f32 100644 --- a/seminar/views.py +++ b/seminar/views.py @@ -322,9 +322,10 @@ class ArchivView(generic.ListView): sirka = 210 # px # nejnovějších 10 zveřejněných čísel - cisla = Cislo.objects.filter(verejne_db=True)[:10] + # cisla = Cislo.objects.filter(verejne_db=True)[:10] + cisla = Cislo.objects.filter(poradi=1)[:10] - # op = os.path, udělá z argumentů cestu + # op == os.path, udělá z argumentů cestu png_dir = op.join(settings.MEDIA_ROOT, "cislo", "png") # seznam [(url obrázku, číslo)] @@ -344,8 +345,8 @@ class ArchivView(generic.ListView): subprocess.call([ "convert", - "-density", "180x180", - "-geometry", "{}x{}".format(vyska, vyska), + "-density", "300x300", + "-geometry", "{}x{}".format(vyska, sirka), "-background", "white", "-flatten", "-rotate", str(90 * i), From 595bc528266d0cba2c9219cd52f503fa331cd016 Mon Sep 17 00:00:00 2001 From: "Tomas \"Jethro\" Pokorny" Date: Wed, 25 Mar 2020 21:57:14 +0100 Subject: [PATCH 2/2] templates | Odstraneny base_*, uz nejsou potreba Slouzily pouze pro spravny vyber ve starem menu. --- seminar/templates/seminar/archiv/base_cisla.html | 8 -------- seminar/templates/seminar/archiv/base_temata.html | 8 -------- seminar/templates/seminar/archiv/base_ulohy.html | 10 ---------- seminar/templates/seminar/archiv/cisla.html | 2 +- seminar/templates/seminar/archiv/cislo.html | 2 +- seminar/templates/seminar/archiv/prispevek.html | 2 +- seminar/templates/seminar/archiv/problem.html | 2 +- seminar/templates/seminar/archiv/rocnik.html | 2 +- seminar/templates/seminar/archiv/temata.html | 2 +- 9 files changed, 6 insertions(+), 32 deletions(-) delete mode 100644 seminar/templates/seminar/archiv/base_cisla.html delete mode 100644 seminar/templates/seminar/archiv/base_temata.html delete mode 100644 seminar/templates/seminar/archiv/base_ulohy.html diff --git a/seminar/templates/seminar/archiv/base_cisla.html b/seminar/templates/seminar/archiv/base_cisla.html deleted file mode 100644 index deb371eb..00000000 --- a/seminar/templates/seminar/archiv/base_cisla.html +++ /dev/null @@ -1,8 +0,0 @@ -{% extends "seminar/archiv/base.html" %} - -{% block submenu %} - {% with "cisla" as selected %} - {% include "seminar/archiv/submenu.html" %} - {% endwith %} -{% endblock %} - diff --git a/seminar/templates/seminar/archiv/base_temata.html b/seminar/templates/seminar/archiv/base_temata.html deleted file mode 100644 index 47089bbf..00000000 --- a/seminar/templates/seminar/archiv/base_temata.html +++ /dev/null @@ -1,8 +0,0 @@ -{% extends "seminar/archiv/base.html" %} - -{% block submenu %} - {% with "temata" as selected %} - {% include "seminar/archiv/submenu.html" %} - {% endwith %} -{% endblock %} - diff --git a/seminar/templates/seminar/archiv/base_ulohy.html b/seminar/templates/seminar/archiv/base_ulohy.html deleted file mode 100644 index 0dcd546a..00000000 --- a/seminar/templates/seminar/archiv/base_ulohy.html +++ /dev/null @@ -1,10 +0,0 @@ -{% extends "seminar/archiv/base.html" %} - -{% block menu_archiv %}selected{% endblock %} - -{% block submenu %} - {% with "ulohy" as selected %} - {% include "seminar/archiv/submenu.html" %} - {% endwith %} -{% endblock %} - diff --git a/seminar/templates/seminar/archiv/cisla.html b/seminar/templates/seminar/archiv/cisla.html index 07833aa4..fbb19263 100644 --- a/seminar/templates/seminar/archiv/cisla.html +++ b/seminar/templates/seminar/archiv/cisla.html @@ -1,4 +1,4 @@ -{% extends "seminar/archiv/base_cisla.html" %} +{% extends "seminar/archiv/base.html" %} {% block content %}
diff --git a/seminar/templates/seminar/archiv/cislo.html b/seminar/templates/seminar/archiv/cislo.html index d3cc50bb..955988f1 100644 --- a/seminar/templates/seminar/archiv/cislo.html +++ b/seminar/templates/seminar/archiv/cislo.html @@ -1,4 +1,4 @@ -{% extends "seminar/archiv/base_cisla.html" %} +{% extends "seminar/archiv/base.html" %} {% block content %}
diff --git a/seminar/templates/seminar/archiv/prispevek.html b/seminar/templates/seminar/archiv/prispevek.html index fdf2b3f2..998eb4e3 100644 --- a/seminar/templates/seminar/archiv/prispevek.html +++ b/seminar/templates/seminar/archiv/prispevek.html @@ -1,4 +1,4 @@ -{% extends "seminar/archiv/base_temata.html" %} +{% extends "seminar/archiv/base.html" %} {% block title %} {{prispevek.nazev}} diff --git a/seminar/templates/seminar/archiv/problem.html b/seminar/templates/seminar/archiv/problem.html index bc921203..91c67c77 100644 --- a/seminar/templates/seminar/archiv/problem.html +++ b/seminar/templates/seminar/archiv/problem.html @@ -1,4 +1,4 @@ -{% extends "seminar/archiv/base_ulohy.html" %} +{% extends "seminar/archiv/base.html" %} {% load comments %} diff --git a/seminar/templates/seminar/archiv/rocnik.html b/seminar/templates/seminar/archiv/rocnik.html index e5289277..64c4029d 100644 --- a/seminar/templates/seminar/archiv/rocnik.html +++ b/seminar/templates/seminar/archiv/rocnik.html @@ -1,4 +1,4 @@ -{% extends "seminar/archiv/base_cisla.html" %} +{% extends "seminar/archiv/base.html" %} {% block content %}
diff --git a/seminar/templates/seminar/archiv/temata.html b/seminar/templates/seminar/archiv/temata.html index 21aebb22..ba2a6206 100644 --- a/seminar/templates/seminar/archiv/temata.html +++ b/seminar/templates/seminar/archiv/temata.html @@ -1,4 +1,4 @@ -{% extends "seminar/archiv/base_temata.html" %} +{% extends "seminar/archiv/base.html" %} {% block content %}