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] =?UTF-8?q?test=20=C3=BAprav=20spir=C3=A1ly=20v=20archivu?= 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),