Merge branch 'data_migrations' of gimli.ms.mff.cuni.cz:/akce/mam/git/mamweb into data_migrations
This commit is contained in:
commit
050ecc5bc8
13 changed files with 295 additions and 158 deletions
|
@ -5,11 +5,39 @@
|
||||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||||
xmlns:svg="http://www.w3.org/2000/svg"
|
xmlns:svg="http://www.w3.org/2000/svg"
|
||||||
xmlns="http://www.w3.org/2000/svg"
|
xmlns="http://www.w3.org/2000/svg"
|
||||||
|
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||||
|
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||||
width="25.135418mm"
|
width="25.135418mm"
|
||||||
height="42.333332mm"
|
height="42.333332mm"
|
||||||
viewBox="0 0 25.135418 42.333331"
|
viewBox="0 0 25.135418 42.333331"
|
||||||
version="1.1"
|
version="1.1"
|
||||||
id="svg851">
|
id="svg851"
|
||||||
|
sodipodi:docname="dalsi.svg"
|
||||||
|
inkscape:version="0.92.4 (5da689c313, 2019-01-14)">
|
||||||
|
<sodipodi:namedview
|
||||||
|
pagecolor="#ffffff"
|
||||||
|
bordercolor="#666666"
|
||||||
|
borderopacity="1"
|
||||||
|
objecttolerance="10"
|
||||||
|
gridtolerance="10"
|
||||||
|
guidetolerance="10"
|
||||||
|
inkscape:pageopacity="0"
|
||||||
|
inkscape:pageshadow="2"
|
||||||
|
inkscape:window-width="1850"
|
||||||
|
inkscape:window-height="1136"
|
||||||
|
id="namedview7"
|
||||||
|
showgrid="true"
|
||||||
|
inkscape:zoom="23.600001"
|
||||||
|
inkscape:cx="18.587131"
|
||||||
|
inkscape:cy="74.924864"
|
||||||
|
inkscape:window-x="70"
|
||||||
|
inkscape:window-y="27"
|
||||||
|
inkscape:window-maximized="1"
|
||||||
|
inkscape:current-layer="svg851">
|
||||||
|
<inkscape:grid
|
||||||
|
type="xygrid"
|
||||||
|
id="grid833" />
|
||||||
|
</sodipodi:namedview>
|
||||||
<defs
|
<defs
|
||||||
id="defs845" />
|
id="defs845" />
|
||||||
<metadata
|
<metadata
|
||||||
|
@ -28,8 +56,10 @@
|
||||||
id="layer1"
|
id="layer1"
|
||||||
transform="matrix(-1.0282842,0,0,1,111.4545,-88.415317)">
|
transform="matrix(-1.0282842,0,0,1,111.4545,-88.415317)">
|
||||||
<path
|
<path
|
||||||
d="m 108.38881,88.415317 -6.43264,21.166663 6.43264,21.16667 -18.011397,-21.16667 z"
|
d="m 98.096584,101.64448 1.286528,1.32292 -5.660724,5.82083 h 13.379892 v 1.5875 H 93.722388 l 5.660724,5.82083 -1.286528,1.32292 -7.719171,-7.9375 z"
|
||||||
style="fill:#e84e10;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.23177969"
|
style="fill:#e84e10;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.23177969"
|
||||||
id="path44-3" />
|
id="path44-3"
|
||||||
|
inkscape:connector-curvature="0"
|
||||||
|
sodipodi:nodetypes="cccccccccc" />
|
||||||
</g>
|
</g>
|
||||||
</svg>
|
</svg>
|
||||||
|
|
Before Width: | Height: | Size: 1 KiB After Width: | Height: | Size: 2 KiB |
|
@ -5,11 +5,39 @@
|
||||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||||
xmlns:svg="http://www.w3.org/2000/svg"
|
xmlns:svg="http://www.w3.org/2000/svg"
|
||||||
xmlns="http://www.w3.org/2000/svg"
|
xmlns="http://www.w3.org/2000/svg"
|
||||||
|
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||||
|
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||||
width="25.135418mm"
|
width="25.135418mm"
|
||||||
height="42.333332mm"
|
height="42.333332mm"
|
||||||
viewBox="0 0 25.135418 42.333331"
|
viewBox="0 0 25.135418 42.333331"
|
||||||
version="1.1"
|
version="1.1"
|
||||||
id="svg851">
|
id="svg851"
|
||||||
|
sodipodi:docname="predchozi.svg"
|
||||||
|
inkscape:version="0.92.4 (5da689c313, 2019-01-14)">
|
||||||
|
<sodipodi:namedview
|
||||||
|
pagecolor="#ffffff"
|
||||||
|
bordercolor="#666666"
|
||||||
|
borderopacity="1"
|
||||||
|
objecttolerance="10"
|
||||||
|
gridtolerance="10"
|
||||||
|
guidetolerance="10"
|
||||||
|
inkscape:pageopacity="0"
|
||||||
|
inkscape:pageshadow="2"
|
||||||
|
inkscape:window-width="1850"
|
||||||
|
inkscape:window-height="1136"
|
||||||
|
id="namedview7"
|
||||||
|
showgrid="true"
|
||||||
|
inkscape:zoom="4.1719301"
|
||||||
|
inkscape:cx="124.03002"
|
||||||
|
inkscape:cy="97.874031"
|
||||||
|
inkscape:window-x="70"
|
||||||
|
inkscape:window-y="27"
|
||||||
|
inkscape:window-maximized="1"
|
||||||
|
inkscape:current-layer="svg851">
|
||||||
|
<inkscape:grid
|
||||||
|
type="xygrid"
|
||||||
|
id="grid833" />
|
||||||
|
</sodipodi:namedview>
|
||||||
<defs
|
<defs
|
||||||
id="defs845" />
|
id="defs845" />
|
||||||
<metadata
|
<metadata
|
||||||
|
@ -26,10 +54,12 @@
|
||||||
</metadata>
|
</metadata>
|
||||||
<g
|
<g
|
||||||
id="layer1"
|
id="layer1"
|
||||||
transform="matrix(-1.0282842,0,0,1,111.4545,-88.415317)">
|
transform="matrix(1.0282842,0,0,1,-86.319083,-88.415315)">
|
||||||
<path
|
<path
|
||||||
d="m 83.944774,88.415319 6.43264,21.166661 -6.43264,21.16667 18.011396,-21.16667 z"
|
d="m 98.096584,101.64448 1.286528,1.32292 -5.660724,5.82083 h 13.379892 v 1.5875 H 93.722388 l 5.660724,5.82083 -1.286528,1.32292 -7.719171,-7.9375 z"
|
||||||
style="fill:#e84e10;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.23177969"
|
style="fill:#e84e10;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.23177969"
|
||||||
id="path44-3" />
|
id="path44-3"
|
||||||
|
inkscape:connector-curvature="0"
|
||||||
|
sodipodi:nodetypes="cccccccccc" />
|
||||||
</g>
|
</g>
|
||||||
</svg>
|
</svg>
|
||||||
|
|
Before Width: | Height: | Size: 1 KiB After Width: | Height: | Size: 2 KiB |
19
seminar/migrations/0082_auto_20200506_1951.py
Normal file
19
seminar/migrations/0082_auto_20200506_1951.py
Normal file
|
@ -0,0 +1,19 @@
|
||||||
|
# Generated by Django 2.2.12 on 2020-05-06 17:51
|
||||||
|
|
||||||
|
from django.db import migrations, models
|
||||||
|
import seminar.models
|
||||||
|
|
||||||
|
|
||||||
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
|
dependencies = [
|
||||||
|
('seminar', '0081_auto_20200408_2221'),
|
||||||
|
]
|
||||||
|
|
||||||
|
operations = [
|
||||||
|
migrations.AlterField(
|
||||||
|
model_name='cislo',
|
||||||
|
name='titulka_nahled',
|
||||||
|
field=models.ImageField(blank=True, help_text='Obrázek titulní strany, generuje se automaticky', null=True, upload_to=seminar.models.cislo_png_filename, verbose_name='Obrázek titulní strany'),
|
||||||
|
),
|
||||||
|
]
|
19
seminar/migrations/0083_auto_20200506_1952.py
Normal file
19
seminar/migrations/0083_auto_20200506_1952.py
Normal file
|
@ -0,0 +1,19 @@
|
||||||
|
# Generated by Django 2.2.12 on 2020-05-06 17:52
|
||||||
|
|
||||||
|
from django.db import migrations, models
|
||||||
|
import django.db.models.deletion
|
||||||
|
|
||||||
|
|
||||||
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
|
dependencies = [
|
||||||
|
('seminar', '0082_auto_20200506_1951'),
|
||||||
|
]
|
||||||
|
|
||||||
|
operations = [
|
||||||
|
migrations.AlterField(
|
||||||
|
model_name='treenode',
|
||||||
|
name='first_child',
|
||||||
|
field=models.OneToOneField(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='father_of_first', to='seminar.TreeNode', verbose_name='první potomek'),
|
||||||
|
),
|
||||||
|
]
|
|
@ -14,6 +14,7 @@ from django.utils.text import slugify
|
||||||
from django.urls import reverse
|
from django.urls import reverse
|
||||||
from django.core.cache import cache
|
from django.core.cache import cache
|
||||||
from django.core.exceptions import ObjectDoesNotExist
|
from django.core.exceptions import ObjectDoesNotExist
|
||||||
|
from django.contrib.contenttypes.models import ContentType
|
||||||
from django.utils.text import get_valid_filename
|
from django.utils.text import get_valid_filename
|
||||||
from imagekit.models import ImageSpecField, ProcessedImageField
|
from imagekit.models import ImageSpecField, ProcessedImageField
|
||||||
from imagekit.processors import ResizeToFit, Transpose
|
from imagekit.processors import ResizeToFit, Transpose
|
||||||
|
@ -1304,6 +1305,10 @@ class TreeNode(PolymorphicModel):
|
||||||
def aktualizuj_nazev(self):
|
def aktualizuj_nazev(self):
|
||||||
raise NotImplementedError("Pokus o aktualizaci názvu obecného TreeNode místo konkrétní instance")
|
raise NotImplementedError("Pokus o aktualizaci názvu obecného TreeNode místo konkrétní instance")
|
||||||
|
|
||||||
|
def get_admin_url(self):
|
||||||
|
content_type = ContentType.objects.get_for_model(self.__class__)
|
||||||
|
return reverse("admin:%s_%s_change" % (content_type.app_label, content_type.model), args=(self.id,))
|
||||||
|
|
||||||
class RocnikNode(TreeNode):
|
class RocnikNode(TreeNode):
|
||||||
class Meta:
|
class Meta:
|
||||||
db_table = 'seminar_nodes_rocnik'
|
db_table = 'seminar_nodes_rocnik'
|
||||||
|
|
|
@ -3,7 +3,7 @@ function addrCountryChanged(){
|
||||||
var stat_text = document.getElementById('id_li_stat_text');
|
var stat_text = document.getElementById('id_li_stat_text');
|
||||||
var stat = stat_select[stat_select.selectedIndex].value;
|
var stat = stat_select[stat_select.selectedIndex].value;
|
||||||
if (stat === "other"){
|
if (stat === "other"){
|
||||||
stat_text.style.display="block";
|
stat_text.style.display="revert";
|
||||||
} else {
|
} else {
|
||||||
stat_text.style.display="none";
|
stat_text.style.display="none";
|
||||||
$('#id_stat_text').val("");
|
$('#id_stat_text').val("");
|
||||||
|
@ -12,18 +12,22 @@ function addrCountryChanged(){
|
||||||
function hideSchoolTextfields(){
|
function hideSchoolTextfields(){
|
||||||
var skola_nazev = document.getElementById('id_li_skola_nazev');
|
var skola_nazev = document.getElementById('id_li_skola_nazev');
|
||||||
var skola_adresa = document.getElementById('id_li_skola_adresa');
|
var skola_adresa = document.getElementById('id_li_skola_adresa');
|
||||||
|
var skola_vypln = document.getElementById('id_li_skola_vypln');
|
||||||
skola_nazev.style.display="none";
|
skola_nazev.style.display="none";
|
||||||
skola_adresa.style.display="none";
|
skola_adresa.style.display="none";
|
||||||
|
skola_vypln.style.display="none";
|
||||||
|
|
||||||
}
|
}
|
||||||
function schoolNotInList(){
|
function schoolNotInList(){
|
||||||
var skola_nazev = document.getElementById('id_li_skola_nazev');
|
var skola_nazev = document.getElementById('id_li_skola_nazev');
|
||||||
var skola_adresa = document.getElementById('id_li_skola_adresa');
|
var skola_adresa = document.getElementById('id_li_skola_adresa');
|
||||||
|
var skola_vypln = document.getElementById('id_li_skola_vypln');
|
||||||
// FIXME nefunguje a nevim proc (TypeError: $(...).select2 is not a function)
|
// FIXME nefunguje a nevim proc (TypeError: $(...).select2 is not a function)
|
||||||
//var skola_select = $('#id_skola').select2();
|
//var skola_select = $('#id_skola').select2();
|
||||||
//skola_select.val(null).trigger('change');
|
//skola_select.val(null).trigger('change');
|
||||||
skola_nazev.style.display="block";
|
skola_vypln.style.display="revert";
|
||||||
skola_adresa.style.display="block";
|
skola_nazev.style.display="revert";
|
||||||
|
skola_adresa.style.display="revert";
|
||||||
}
|
}
|
||||||
|
|
||||||
document.addEventListener("DOMContentLoaded", function(){
|
document.addEventListener("DOMContentLoaded", function(){
|
||||||
|
|
|
@ -7,17 +7,13 @@
|
||||||
{% endblock %}{% endblock%}
|
{% endblock %}{% endblock%}
|
||||||
</h1>
|
</h1>
|
||||||
|
|
||||||
{% for tema in object_list %}
|
{% for rocnik, temata in rocniky.items %}
|
||||||
{% with tema.cislo_zadani.rocnik.rocnik as rocnik %}
|
<h2>Ročník {{ rocnik }}</h2>
|
||||||
{% ifchanged rocnik %}
|
<ul>
|
||||||
{% if not forloop.first %}</ul>{% endif %}
|
{% for tema in temata %}
|
||||||
<h2>{{ rocnik }}. ročník</h2>
|
<li><a href="{{ tema.verejne_utl }}"> {{ tema.kod_v_rocniku }}: {{ tema.nazev }} </a></li>
|
||||||
<ul>
|
{% endfor %}
|
||||||
{% endifchanged %}
|
</ul>
|
||||||
<li>
|
|
||||||
<a href="{{ tema.verejne_url }}">{{ tema.kod_v_rocniku }}: {{ tema.nazev }}</a>
|
|
||||||
{% endwith %}
|
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</ul>
|
|
||||||
|
|
||||||
{% endblock content %}
|
{% endblock content %}
|
||||||
|
|
|
@ -15,59 +15,77 @@
|
||||||
<form action="{% url 'seminar_resitel_edit' %}" method="post">
|
<form action="{% url 'seminar_resitel_edit' %}" method="post">
|
||||||
{% csrf_token %}
|
{% csrf_token %}
|
||||||
{{form.non_field_errors}}
|
{{form.non_field_errors}}
|
||||||
<ul class="form">
|
|
||||||
<li>
|
<hr>
|
||||||
Přihlašovací údaje
|
|
||||||
</li><li>
|
<h4>
|
||||||
|
Přihlašovací údaje
|
||||||
|
</h4>
|
||||||
|
<table class="form">
|
||||||
{% include "seminar/prihlaska_field.html" with field=form.username %}
|
{% include "seminar/prihlaska_field.html" with field=form.username %}
|
||||||
</li><li>
|
</table>
|
||||||
|
|
||||||
|
<hr>
|
||||||
|
|
||||||
|
<h4>
|
||||||
Osobní údaje
|
Osobní údaje
|
||||||
</li><li>
|
</h4>
|
||||||
|
<table class="form">
|
||||||
{% include "seminar/prihlaska_field.html" with field=form.jmeno %}
|
{% include "seminar/prihlaska_field.html" with field=form.jmeno %}
|
||||||
</li><li>
|
|
||||||
{% include "seminar/prihlaska_field.html" with field=form.prijmeni %}
|
{% include "seminar/prihlaska_field.html" with field=form.prijmeni %}
|
||||||
</li><li>
|
|
||||||
{% include "seminar/prihlaska_field.html" with field=form.pohlavi_muz%}
|
{% include "seminar/prihlaska_field.html" with field=form.pohlavi_muz%}
|
||||||
</li><li>
|
|
||||||
{% include "seminar/prihlaska_field.html" with field=form.email %}
|
{% include "seminar/prihlaska_field.html" with field=form.email %}
|
||||||
</li><li>
|
|
||||||
{% include "seminar/prihlaska_field.html" with field=form.telefon %}
|
{% include "seminar/prihlaska_field.html" with field=form.telefon %}
|
||||||
</li><li>
|
|
||||||
{% include "seminar/prihlaska_field.html" with field=form.datum_narozeni %}
|
{% include "seminar/prihlaska_field.html" with field=form.datum_narozeni %}
|
||||||
</li><li>
|
</table>
|
||||||
|
|
||||||
<hr>
|
<hr>
|
||||||
Bydliště
|
|
||||||
</li><li>
|
<h4>
|
||||||
|
Bydliště
|
||||||
|
</h4>
|
||||||
|
<table class="form">
|
||||||
{% include "seminar/prihlaska_field.html" with field=form.ulice %}
|
{% include "seminar/prihlaska_field.html" with field=form.ulice %}
|
||||||
</li><li>
|
|
||||||
{% include "seminar/prihlaska_field.html" with field=form.mesto %}
|
{% include "seminar/prihlaska_field.html" with field=form.mesto %}
|
||||||
</li><li>
|
|
||||||
{% include "seminar/prihlaska_field.html" with field=form.psc %}
|
{% include "seminar/prihlaska_field.html" with field=form.psc %}
|
||||||
</li><li>
|
|
||||||
{% include "seminar/prihlaska_field.html" with field=form.stat %}
|
{% include "seminar/prihlaska_field.html" with field=form.stat %}
|
||||||
</li>
|
{% include "seminar/prihlaska_field.html" with field=form.stat_text id="id_li_stat_text"%}
|
||||||
<li id="id_li_stat_text">
|
</table>
|
||||||
{% include "seminar/prihlaska_field.html" with field=form.stat_text %}
|
|
||||||
</li><li>
|
|
||||||
<hr>
|
<hr>
|
||||||
|
|
||||||
|
<h4>
|
||||||
|
Škola
|
||||||
|
</h4>
|
||||||
|
<table class="form">
|
||||||
{% include "seminar/prihlaska_field.html" with field=form.skola %}
|
{% include "seminar/prihlaska_field.html" with field=form.skola %}
|
||||||
</li><li>
|
<tr><td colspan="2" ><button id="id_skola_text_button" type="button">Škola není v seznamu</button></td></tr>
|
||||||
<button id="id_skola_text_button" type="button">Škola není v seznamu</button>
|
<tr><td id="id_li_skola_vypln" colspan="2">Vyplň prosím celý název a adresu školy.</td></tr>
|
||||||
</li>
|
{% include "seminar/prihlaska_field.html" with field=form.skola_nazev id="id_li_skola_nazev" %}
|
||||||
<li id="id_li_skola_nazev">
|
{% include "seminar/prihlaska_field.html" with field=form.skola_adresa id="id_li_skola_adresa" %}
|
||||||
Vyplň prosím celý název a adresu školy.<br>
|
|
||||||
{% include "seminar/prihlaska_field.html" with field=form.skola_nazev %}
|
|
||||||
</li>
|
|
||||||
<li id="id_li_skola_adresa">
|
|
||||||
{% include "seminar/prihlaska_field.html" with field=form.skola_adresa %}
|
|
||||||
</li><li>
|
|
||||||
{% include "seminar/prihlaska_field.html" with field=form.rok_maturity %}
|
{% include "seminar/prihlaska_field.html" with field=form.rok_maturity %}
|
||||||
</li><li>
|
</table>
|
||||||
|
|
||||||
|
<hr>
|
||||||
|
|
||||||
|
<h4>
|
||||||
|
Pošta
|
||||||
|
</h4>
|
||||||
|
<table class="form">
|
||||||
{% include "seminar/prihlaska_field.html" with field=form.zasilat %}
|
{% include "seminar/prihlaska_field.html" with field=form.zasilat %}
|
||||||
</li><li>
|
</table>
|
||||||
|
|
||||||
|
<hr>
|
||||||
|
|
||||||
|
<h4>
|
||||||
|
Zasílání propagačních materiálů
|
||||||
|
</h4>
|
||||||
|
<table class="form">
|
||||||
{% include "seminar/prihlaska_field.html" with field=form.spam %}
|
{% include "seminar/prihlaska_field.html" with field=form.spam %}
|
||||||
</li>
|
</table>
|
||||||
</ul>
|
|
||||||
|
<hr>
|
||||||
|
|
||||||
<input type="submit" value="Změnit">
|
<input type="submit" value="Změnit">
|
||||||
</form>
|
</form>
|
||||||
<script>
|
<script>
|
||||||
|
@ -75,4 +93,3 @@ $("#id_stat").on("change",addrCountryChanged);
|
||||||
$("#id_skola_text_button").on("click",schoolNotInList);
|
$("#id_skola_text_button").on("click",schoolNotInList);
|
||||||
</script>
|
</script>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
|
|
|
@ -10,9 +10,9 @@
|
||||||
</h1>
|
</h1>
|
||||||
<form action="{% url 'login' %}" method="post">
|
<form action="{% url 'login' %}" method="post">
|
||||||
{% csrf_token %}
|
{% csrf_token %}
|
||||||
<ul class="form">
|
<table class="form">
|
||||||
{{ form.as_ul }}
|
{{ form.as_table }}
|
||||||
</ul>
|
</table>
|
||||||
{# Django si posílá jméno další stránky jako obsah formuláře a výchozí hodnota (mi přišlo, že) nejde změnit... #}
|
{# Django si posílá jméno další stránky jako obsah formuláře a výchozí hodnota (mi přišlo, že) nejde změnit... #}
|
||||||
<input type="hidden" name='next' value="{{ next }}">
|
<input type="hidden" name='next' value="{{ next }}">
|
||||||
<input type="submit" value="Přihlásit">
|
<input type="submit" value="Přihlásit">
|
||||||
|
@ -23,4 +23,3 @@
|
||||||
|
|
||||||
|
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
|
|
|
@ -14,92 +14,93 @@
|
||||||
{% endblock %}{% endblock %}
|
{% endblock %}{% endblock %}
|
||||||
</h1>
|
</h1>
|
||||||
|
|
||||||
|
|
||||||
<form action="{% url 'seminar_prihlaska' %}" method="post">
|
<form action="{% url 'seminar_prihlaska' %}" method="post">
|
||||||
{% csrf_token %}
|
{% csrf_token %}
|
||||||
{{form.non_field_errors}}
|
{{form.non_field_errors}}
|
||||||
<ul class="form">
|
|
||||||
<li>
|
|
||||||
Přihlašovací údaje
|
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
{% include "seminar/prihlaska_field.html" with field=form.username %}
|
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
{% include "seminar/prihlaska_field.html" with field=form.password %}
|
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
{% include "seminar/prihlaska_field.html" with field=form.password_check %}
|
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
Osobní údaje
|
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
{% include "seminar/prihlaska_field.html" with field=form.jmeno %}
|
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
{% include "seminar/prihlaska_field.html" with field=form.prijmeni %}
|
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
{% include "seminar/prihlaska_field.html" with field=form.pohlavi_muz%}
|
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
{% include "seminar/prihlaska_field.html" with field=form.email %}
|
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
{% include "seminar/prihlaska_field.html" with field=form.telefon %}
|
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
{% include "seminar/prihlaska_field.html" with field=form.datum_narozeni %}
|
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
<hr>
|
|
||||||
Bydliště
|
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
{% include "seminar/prihlaska_field.html" with field=form.ulice %}
|
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
{% include "seminar/prihlaska_field.html" with field=form.mesto %}
|
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
{% include "seminar/prihlaska_field.html" with field=form.psc %}
|
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
{% include "seminar/prihlaska_field.html" with field=form.stat %}
|
|
||||||
</li>
|
|
||||||
<li id="id_li_stat_text">
|
|
||||||
{% include "seminar/prihlaska_field.html" with field=form.stat_text %}
|
|
||||||
</li>
|
|
||||||
|
|
||||||
<li>
|
|
||||||
<hr>
|
<hr>
|
||||||
{% include "seminar/prihlaska_field.html" with field=form.skola %}
|
<h4>
|
||||||
</li>
|
Přihlašovací údaje
|
||||||
<li>
|
</h4>
|
||||||
<button id="id_skola_text_button" type="button">Škola není v seznamu</button>
|
<table class="form">
|
||||||
</li>
|
{% include "seminar/prihlaska_field.html" with field=form.username %}
|
||||||
<li id="id_li_skola_nazev">
|
{% include "seminar/prihlaska_field.html" with field=form.password %}
|
||||||
Vyplň prosím celý název a adresu školy.<br>
|
{% include "seminar/prihlaska_field.html" with field=form.password_check %}
|
||||||
{% include "seminar/prihlaska_field.html" with field=form.skola_nazev %}
|
</table>
|
||||||
</li>
|
|
||||||
<li id="id_li_skola_adresa">
|
<hr>
|
||||||
{% include "seminar/prihlaska_field.html" with field=form.skola_adresa %}
|
|
||||||
</li>
|
<h4>
|
||||||
<li>
|
Osobní údaje
|
||||||
{% include "seminar/prihlaska_field.html" with field=form.rok_maturity %}
|
</h4>
|
||||||
</li>
|
<table class="form">
|
||||||
<li>
|
{% include "seminar/prihlaska_field.html" with field=form.jmeno %}
|
||||||
{% include "seminar/prihlaska_field.html" with field=form.zasilat %}
|
{% include "seminar/prihlaska_field.html" with field=form.prijmeni %}
|
||||||
</li>
|
{% include "seminar/prihlaska_field.html" with field=form.pohlavi_muz%}
|
||||||
<li>
|
{% include "seminar/prihlaska_field.html" with field=form.email %}
|
||||||
{% include "seminar/gdpr.html" %}
|
{% include "seminar/prihlaska_field.html" with field=form.telefon %}
|
||||||
{% include "seminar/prihlaska_field.html" with field=form.gdpr %}
|
{% include "seminar/prihlaska_field.html" with field=form.datum_narozeni %}
|
||||||
</li>
|
</table>
|
||||||
<li>
|
|
||||||
{% include "seminar/prihlaska_field.html" with field=form.spam %}
|
<hr>
|
||||||
</li>
|
|
||||||
</ul>
|
<h4>
|
||||||
|
Bydliště
|
||||||
|
</h4>
|
||||||
|
<table class="form">
|
||||||
|
{% include "seminar/prihlaska_field.html" with field=form.ulice %}
|
||||||
|
{% include "seminar/prihlaska_field.html" with field=form.mesto %}
|
||||||
|
{% include "seminar/prihlaska_field.html" with field=form.psc %}
|
||||||
|
{% include "seminar/prihlaska_field.html" with field=form.stat %}
|
||||||
|
{% include "seminar/prihlaska_field.html" with field=form.stat_text id="id_li_stat_text"%}
|
||||||
|
</table>
|
||||||
|
|
||||||
|
<hr>
|
||||||
|
|
||||||
|
<h4>
|
||||||
|
Škola
|
||||||
|
</h4>
|
||||||
|
<table class="form">
|
||||||
|
{% include "seminar/prihlaska_field.html" with field=form.skola %}
|
||||||
|
<tr><td colspan="2" ><button id="id_skola_text_button" type="button">Škola není v seznamu</button></td></tr>
|
||||||
|
<tr><td id="id_li_skola_vypln" colspan="2">Vyplň prosím celý název a adresu školy.</td></tr>
|
||||||
|
{% include "seminar/prihlaska_field.html" with field=form.skola_nazev id="id_li_skola_nazev" %}
|
||||||
|
{% include "seminar/prihlaska_field.html" with field=form.skola_adresa id="id_li_skola_adresa" %}
|
||||||
|
{% include "seminar/prihlaska_field.html" with field=form.rok_maturity %}
|
||||||
|
</table>
|
||||||
|
|
||||||
|
<hr>
|
||||||
|
|
||||||
|
<h4>
|
||||||
|
Pošta
|
||||||
|
</h4>
|
||||||
|
<table class="form">
|
||||||
|
{% include "seminar/prihlaska_field.html" with field=form.zasilat %}
|
||||||
|
</table>
|
||||||
|
<hr>
|
||||||
|
|
||||||
|
<h4>
|
||||||
|
GDPR
|
||||||
|
</h4>
|
||||||
|
{% include "seminar/gdpr.html" %}
|
||||||
|
<table class="form">
|
||||||
|
{% include "seminar/prihlaska_field.html" with field=form.gdpr %}
|
||||||
|
</table>
|
||||||
|
|
||||||
|
<hr>
|
||||||
|
|
||||||
|
<h4>
|
||||||
|
Zasílání propagačních materiálů
|
||||||
|
</h4>
|
||||||
|
<table class="form">
|
||||||
|
{% include "seminar/prihlaska_field.html" with field=form.spam %}
|
||||||
|
</table>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<hr>
|
||||||
|
|
||||||
<input type="submit" value="Odeslat">
|
<input type="submit" value="Odeslat">
|
||||||
</form>
|
</form>
|
||||||
<script>
|
<script>
|
||||||
|
@ -109,4 +110,3 @@ $("#id_skola_text_button").on("click",schoolNotInList);
|
||||||
|
|
||||||
|
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,23 @@
|
||||||
<label class="field-label{% if field.field.required %} field-required{% endif %}" for="{{ field.id_for_label }}">{{ field.label }}:</label>
|
|
||||||
{{field}}
|
<tr id="{{ id }}" >
|
||||||
{% if field.help_text %}<span class="field-helptext">{{ field.help_text|safe }}</span>{% endif %}
|
<td>
|
||||||
{% if field.errors %}<span class="field-error">{{ field.errors }}</span>{% endif %}
|
<label class="field-label{% if field.field.required %} field-required{% endif %}" for="{{ field.id_for_label }}">
|
||||||
|
{{ field.label }}:
|
||||||
|
</label>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
{{ field }}
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
{% if field.help_text %}
|
||||||
|
<tr>
|
||||||
|
<td colspan="2"><span class="field-helptext">{{ field.help_text|safe }}</span></td>
|
||||||
|
</tr>
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
{% if field.errors %}
|
||||||
|
<tr>
|
||||||
|
<td colspan="2"><span class="field-error">{{ field.errors }}</span></td>
|
||||||
|
</tr>
|
||||||
|
{% endif %}
|
||||||
|
|
|
@ -34,11 +34,6 @@ urlpatterns = [
|
||||||
views.SoustredeniListView.as_view(),
|
views.SoustredeniListView.as_view(),
|
||||||
name='seminar_seznam_soustredeni'
|
name='seminar_seznam_soustredeni'
|
||||||
),
|
),
|
||||||
path(
|
|
||||||
'soustredeni/probehlo/<int:soustredeni>/',
|
|
||||||
views.SoustredeniView.as_view(),
|
|
||||||
name='seminar_soustredeni'
|
|
||||||
),
|
|
||||||
path(
|
path(
|
||||||
'soustredeni/<int:soustredeni>/seznam_ucastniku',
|
'soustredeni/<int:soustredeni>/seznam_ucastniku',
|
||||||
staff_member_required(views.SoustredeniUcastniciView.as_view()),
|
staff_member_required(views.SoustredeniUcastniciView.as_view()),
|
||||||
|
|
|
@ -27,6 +27,7 @@ import seminar.forms as f
|
||||||
from datetime import timedelta, date, datetime
|
from datetime import timedelta, date, datetime
|
||||||
from django.utils import timezone
|
from django.utils import timezone
|
||||||
from itertools import groupby
|
from itertools import groupby
|
||||||
|
from collections import OrderedDict
|
||||||
import tempfile
|
import tempfile
|
||||||
import subprocess
|
import subprocess
|
||||||
import shutil
|
import shutil
|
||||||
|
@ -777,7 +778,14 @@ class CisloView(generic.DetailView):
|
||||||
class ArchivTemataView(generic.ListView):
|
class ArchivTemataView(generic.ListView):
|
||||||
model = Problem
|
model = Problem
|
||||||
template_name = 'seminar/archiv/temata.html'
|
template_name = 'seminar/archiv/temata.html'
|
||||||
queryset = Tema.objects.filter(stav=Problem.STAV_ZADANY).select_related('cislo_zadani__rocnik').order_by('-cislo_zadani__rocnik__rocnik', 'kod')
|
queryset = Tema.objects.filter(stav=Problem.STAV_ZADANY).select_related('rocnik').order_by('rocnik', 'kod')
|
||||||
|
|
||||||
|
def get_context_data(self, *args, **kwargs):
|
||||||
|
ctx = super().get_context_data(*args, **kwargs)
|
||||||
|
ctx['rocniky'] = OrderedDict()
|
||||||
|
for rocnik, temata in groupby(ctx['object_list'], lambda tema: tema.rocnik):
|
||||||
|
ctx['rocniky'][rocnik] = list(temata)
|
||||||
|
return ctx
|
||||||
|
|
||||||
### Generovani vysledkovky
|
### Generovani vysledkovky
|
||||||
|
|
||||||
|
@ -913,10 +921,6 @@ class SoustredeniListView(generic.ListView):
|
||||||
model = Soustredeni
|
model = Soustredeni
|
||||||
template_name = 'seminar/soustredeni/seznam_soustredeni.html'
|
template_name = 'seminar/soustredeni/seznam_soustredeni.html'
|
||||||
|
|
||||||
class SoustredeniView(generic.DetailView):
|
|
||||||
model = Soustredeni
|
|
||||||
template_name = 'seminar/archiv/soustredeni.html'
|
|
||||||
|
|
||||||
def soustredeniObalkyView(request,soustredeni):
|
def soustredeniObalkyView(request,soustredeni):
|
||||||
soustredeni = get_object_or_404(Soustredeni,id = soustredeni)
|
soustredeni = get_object_or_404(Soustredeni,id = soustredeni)
|
||||||
return obalkyView(request,soustredeni.ucastnici.all())
|
return obalkyView(request,soustredeni.ucastnici.all())
|
||||||
|
|
Loading…
Reference in a new issue