Browse Source

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

export_seznamu_prednasek
Anet 5 years ago
parent
commit
7caac0db4e
  1. 8
      seminar/templates/seminar/archiv/base_cisla.html
  2. 8
      seminar/templates/seminar/archiv/base_temata.html
  3. 10
      seminar/templates/seminar/archiv/base_ulohy.html
  4. 2
      seminar/templates/seminar/archiv/cisla.html
  5. 2
      seminar/templates/seminar/archiv/cislo.html
  6. 2
      seminar/templates/seminar/archiv/prispevek.html
  7. 2
      seminar/templates/seminar/archiv/problem.html
  8. 2
      seminar/templates/seminar/archiv/rocnik.html
  9. 2
      seminar/templates/seminar/archiv/temata.html
  10. 9
      seminar/views/views_all.py

8
seminar/templates/seminar/archiv/base_cisla.html

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

8
seminar/templates/seminar/archiv/base_temata.html

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

10
seminar/templates/seminar/archiv/base_ulohy.html

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

2
seminar/templates/seminar/archiv/cisla.html

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

2
seminar/templates/seminar/archiv/cislo.html

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

2
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}}

2
seminar/templates/seminar/archiv/problem.html

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

2
seminar/templates/seminar/archiv/rocnik.html

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

2
seminar/templates/seminar/archiv/temata.html

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

9
seminar/views/views_all.py

@ -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),

Loading…
Cancel
Save