Merge branch 'stable'
This commit is contained in:
commit
b37b691725
4 changed files with 62 additions and 14 deletions
|
@ -49,7 +49,8 @@
|
||||||
<a href="../{{soustredeni.pk}}/obalky.pdf">Vygenerovat obálky pro účastníky</a><br>
|
<a href="../{{soustredeni.pk}}/obalky.pdf">Vygenerovat obálky pro účastníky</a><br>
|
||||||
Seznam účastníků -
|
Seznam účastníků -
|
||||||
<a href="../{{soustredeni.pk}}/seznam_ucastniku">HTML tabulka pro tisk</a>,
|
<a href="../{{soustredeni.pk}}/seznam_ucastniku">HTML tabulka pro tisk</a>,
|
||||||
<a href="../{{soustredeni.pk}}/export_ucastniku">CSV</a><br>
|
<a href="../{{soustredeni.pk}}/export_ucastniku">CSV</a>,
|
||||||
|
<a href="../{{soustredeni.pk}}/maily_ucastniku">E-maily</a><br>
|
||||||
<a href="../{{soustredeni.pk}}/stvrzenky/42">Stvrzenky <i>(42 v URL nahraďte prvním číslem z rozsahu)</i></a>
|
<a href="../{{soustredeni.pk}}/stvrzenky/42">Stvrzenky <i>(42 v URL nahraďte prvním číslem z rozsahu)</i></a>
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
|
@ -18,6 +18,7 @@
|
||||||
<th nowrap>Jméno</th>
|
<th nowrap>Jméno</th>
|
||||||
<th nowrap>Maturita</th>
|
<th nowrap>Maturita</th>
|
||||||
<th nowrap>Mobil</th>
|
<th nowrap>Mobil</th>
|
||||||
|
<th nowrap>Poznámka</th>
|
||||||
<th class="fill"></th>
|
<th class="fill"></th>
|
||||||
</tr>
|
</tr>
|
||||||
{% for sous_ucast in object_list %}
|
{% for sous_ucast in object_list %}
|
||||||
|
@ -25,6 +26,7 @@
|
||||||
<td nowrap>{{sous_ucast.resitel}}</td>
|
<td nowrap>{{sous_ucast.resitel}}</td>
|
||||||
<td nowrap>{{sous_ucast.resitel.rok_maturity}}</td>
|
<td nowrap>{{sous_ucast.resitel.rok_maturity}}</td>
|
||||||
<td nowrap>{{sous_ucast.resitel.telefon}}</td>
|
<td nowrap>{{sous_ucast.resitel.telefon}}</td>
|
||||||
|
<td nowrap>{{sous_ucast.poznamka}}</td>
|
||||||
<td class="fill"></td>
|
<td class="fill"></td>
|
||||||
|
|
||||||
</tr>
|
</tr>
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
from django.conf.urls import * # NOQA
|
from django.conf.urls import * # NOQA
|
||||||
from django.conf.urls import patterns, url
|
from django.conf.urls import url, include
|
||||||
from django.contrib.auth.decorators import user_passes_test
|
from django.contrib.auth.decorators import user_passes_test
|
||||||
from . import views, export
|
from . import views, export
|
||||||
from utils import staff_member_required
|
from utils import staff_member_required
|
||||||
|
@ -25,13 +25,40 @@ urlpatterns = [
|
||||||
url(r'^problem/(?P<pk>\d+)/(?P<prispevek>\d+)/$', views.PrispevekView.as_view(), name='seminar_problem_prispevek'),
|
url(r'^problem/(?P<pk>\d+)/(?P<prispevek>\d+)/$', views.PrispevekView.as_view(), name='seminar_problem_prispevek'),
|
||||||
|
|
||||||
# Soustredeni
|
# Soustredeni
|
||||||
url(r'^soustredeni/probehlo/$', views.SoustredeniListView.as_view(),
|
url(
|
||||||
name = 'seminar_seznam_soustredeni'),
|
r'^soustredeni/probehlo/$',
|
||||||
url(r'^soustredeni/probehlo/(?P<soustredeni>\d+)/$', views.SoustredeniView.as_view(), name='seminar_soustredeni'),
|
views.SoustredeniListView.as_view(),
|
||||||
url(r'^soustredeni/(?P<soustredeni>\d+)/seznam_ucastniku$', staff_member_required(views.SoustredeniUcastniciView.as_view()), name='soustredeni_ucastnici'),
|
name='seminar_seznam_soustredeni'
|
||||||
url(r'^soustredeni/(?P<soustredeni>\d+)/stvrzenky/(?P<first_num>\d+)$', staff_member_required(views.soustredeniStvrzenkyExportView), name='soustredeni_stvrzenky'),
|
),
|
||||||
url(r'^soustredeni/(?P<soustredeni>\d+)/export_ucastniku$', staff_member_required(views.soustredeniUcastniciExportView), name='soustredeni_ucastnici_export'),
|
url(
|
||||||
url(r'^soustredeni/(?P<soustredeni>\d+)/fotogalerie/', include('galerie.urls')),
|
r'^soustredeni/probehlo/(?P<soustredeni>\d+)/$',
|
||||||
|
views.SoustredeniView.as_view(),
|
||||||
|
name='seminar_soustredeni'
|
||||||
|
),
|
||||||
|
url(
|
||||||
|
r'^soustredeni/(?P<soustredeni>\d+)/seznam_ucastniku$',
|
||||||
|
staff_member_required(views.SoustredeniUcastniciView.as_view()),
|
||||||
|
name='soustredeni_ucastnici'
|
||||||
|
),
|
||||||
|
url(
|
||||||
|
r'^soustredeni/(?P<soustredeni>\d+)/maily_ucastniku$',
|
||||||
|
staff_member_required(views.SoustredeniMailyUcastnikuView.as_view()),
|
||||||
|
name='maily_ucastniku'
|
||||||
|
),
|
||||||
|
url(
|
||||||
|
r'^soustredeni/(?P<soustredeni>\d+)/stvrzenky/(?P<first_num>\d+)$',
|
||||||
|
staff_member_required(views.soustredeniStvrzenkyExportView),
|
||||||
|
name='soustredeni_stvrzenky'
|
||||||
|
),
|
||||||
|
url(
|
||||||
|
r'^soustredeni/(?P<soustredeni>\d+)/export_ucastniku$',
|
||||||
|
staff_member_required(views.soustredeniUcastniciExportView),
|
||||||
|
name='soustredeni_ucastnici_export'
|
||||||
|
),
|
||||||
|
url(
|
||||||
|
r'^soustredeni/(?P<soustredeni>\d+)/fotogalerie/',
|
||||||
|
include('galerie.urls')
|
||||||
|
),
|
||||||
|
|
||||||
# Zadani
|
# Zadani
|
||||||
url(r'^zadani/aktualni/$', views.AktualniZadaniView, name='seminar_aktualni_zadani'),
|
url(r'^zadani/aktualni/$', views.AktualniZadaniView, name='seminar_aktualni_zadani'),
|
||||||
|
|
|
@ -611,6 +611,7 @@ def obalkyView(request,resitele):
|
||||||
shutil.rmtree(tempdir)
|
shutil.rmtree(tempdir)
|
||||||
return response
|
return response
|
||||||
|
|
||||||
|
|
||||||
def obalkovaniView(request, rocnik, cislo):
|
def obalkovaniView(request, rocnik, cislo):
|
||||||
rocnik = Rocnik.objects.get(rocnik=rocnik)
|
rocnik = Rocnik.objects.get(rocnik=rocnik)
|
||||||
cislo = Cislo.objects.get(rocnik=rocnik, cislo=cislo)
|
cislo = Cislo.objects.get(rocnik=rocnik, cislo=cislo)
|
||||||
|
@ -673,13 +674,30 @@ 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())
|
||||||
|
|
||||||
class SoustredeniUcastniciView(generic.ListView):
|
|
||||||
|
class SoustredeniUcastniciBaseView(generic.ListView):
|
||||||
|
model = Soustredeni_Ucastnici
|
||||||
|
|
||||||
|
def get_queryset(self):
|
||||||
|
soustredeni = get_object_or_404(
|
||||||
|
Soustredeni,
|
||||||
|
pk=self.kwargs["soustredeni"]
|
||||||
|
)
|
||||||
|
return Soustredeni_Ucastnici.objects.filter(
|
||||||
|
soustredeni=soustredeni).select_related('resitel')
|
||||||
|
|
||||||
|
|
||||||
|
class SoustredeniMailyUcastnikuView(SoustredeniUcastniciBaseView):
|
||||||
|
"""Seznam e-mailů řešitelů oddělených čárkami"""
|
||||||
|
model = Soustredeni_Ucastnici
|
||||||
|
template_name = 'seminar/soustredeni/maily_ucastniku.txt'
|
||||||
|
|
||||||
|
|
||||||
|
class SoustredeniUcastniciView(SoustredeniUcastniciBaseView):
|
||||||
|
"""HTML tabulka účastníků pro tisk"""
|
||||||
model = Soustredeni_Ucastnici
|
model = Soustredeni_Ucastnici
|
||||||
template_name = 'seminar/soustredeni/seznam_ucastniku.html'
|
template_name = 'seminar/soustredeni/seznam_ucastniku.html'
|
||||||
|
|
||||||
def get_queryset(self):
|
|
||||||
self.soustredeni = get_object_or_404(Soustredeni, id=self.kwargs["soustredeni"])
|
|
||||||
return Soustredeni_Ucastnici.objects.filter(soustredeni=self.soustredeni).select_related('resitel')
|
|
||||||
|
|
||||||
def soustredeniStvrzenkyExportView(request,soustredeni,first_num):
|
def soustredeniStvrzenkyExportView(request,soustredeni,first_num):
|
||||||
first_num = int(first_num)
|
first_num = int(first_num)
|
||||||
|
|
Loading…
Reference in a new issue