Merge branch 'data_migrations' of gimli.ms.mff.cuni.cz:/akce/mam/git/mamweb into data_migrations

This commit is contained in:
Anet 2020-03-26 00:01:04 +01:00
commit 7caac0db4e
10 changed files with 12 additions and 35 deletions

View file

@ -1,8 +0,0 @@
{% extends "seminar/archiv/base.html" %}
{% block submenu %}
{% with "cisla" as selected %}
{% include "seminar/archiv/submenu.html" %}
{% endwith %}
{% endblock %}

View file

@ -1,8 +0,0 @@
{% extends "seminar/archiv/base.html" %}
{% block submenu %}
{% with "temata" as selected %}
{% include "seminar/archiv/submenu.html" %}
{% endwith %}
{% endblock %}

View file

@ -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 %}

View file

@ -1,4 +1,4 @@
{% extends "seminar/archiv/base_cisla.html" %}
{% extends "seminar/archiv/base.html" %}
{% block content %}
<div>

View file

@ -1,4 +1,4 @@
{% extends "seminar/archiv/base_cisla.html" %}
{% extends "seminar/archiv/base.html" %}
{% block content %}
<div>

View file

@ -1,4 +1,4 @@
{% extends "seminar/archiv/base_temata.html" %}
{% extends "seminar/archiv/base.html" %}
{% block title %}
{{prispevek.nazev}}

View file

@ -1,4 +1,4 @@
{% extends "seminar/archiv/base_ulohy.html" %}
{% extends "seminar/archiv/base.html" %}
{% load comments %}

View file

@ -1,4 +1,4 @@
{% extends "seminar/archiv/base_cisla.html" %}
{% extends "seminar/archiv/base.html" %}
{% block content %}
<div>

View file

@ -1,4 +1,4 @@
{% extends "seminar/archiv/base_temata.html" %}
{% extends "seminar/archiv/base.html" %}
{% block content %}
<h1>

View file

@ -300,8 +300,11 @@ class ArchivView(generic.ListView):
vyska = 297 # px
sirka = 210 # px
cisla = Cislo.objects.filter(verejne_db=True)[:10]
# nejnovějších 10 zveřejněných čísel
# cisla = Cislo.objects.filter(verejne_db=True)[:10]
cisla = Cislo.objects.filter(poradi=1)[:10]
# op == os.path, udělá z argumentů cestu
png_dir = op.join(settings.MEDIA_ROOT, "cislo", "png")
# seznam [(url obrázku, číslo)]
@ -320,8 +323,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),