diff --git a/vyroci/templates/vyroci/vyroci_list.html b/vyroci/templates/vyroci/vyroci_list.html new file mode 100644 index 00000000..3f3a44ba --- /dev/null +++ b/vyroci/templates/vyroci/vyroci_list.html @@ -0,0 +1,31 @@ +{% extends "base.html" %} + +{% block content %} + +

{% block nadpis1a %}M&Mí 30! odpovědi{% endblock nadpis1a %}

+ + + + + + + + + + + + + {% for obj in ucastnikvyroci_list %} + + + + + + + + + + {% endfor %} +
JménoPřezdívkaE-mailKdy účastník/orgCo znamená M&M?Co znamená číslo?Něco dodat?
{{ obj.jmeno }}{{ obj.prezdivka }}{{ obj.email }}{{ obj.kdy }}{{ obj.cojemam }}{{ obj.cislo }}{{ obj.dodat }}
+ +{% endblock content %} diff --git a/vyroci/urls.py b/vyroci/urls.py index ba5312eb..9b1ebfca 100644 --- a/vyroci/urls.py +++ b/vyroci/urls.py @@ -1,6 +1,7 @@ from django.urls import path -from .views import VyrociView +from seminar.utils import org_required +from .views import VyrociView, VyrociListView urlpatterns = [ path( @@ -8,4 +9,9 @@ urlpatterns = [ VyrociView.as_view(), name='vyrocni_sraz' ), + path( + 'sraz_vysledky/', + org_required(VyrociListView.as_view()), + name='vyrocni_sraz_vysledky' + ), ] diff --git a/vyroci/views.py b/vyroci/views.py index 9a60ff6e..40d87302 100644 --- a/vyroci/views.py +++ b/vyroci/views.py @@ -1,4 +1,4 @@ -from django.views.generic import FormView +from django.views.generic import FormView, ListView from seminar.models import Osoba from seminar.views import formularOKView @@ -29,3 +29,8 @@ class VyrociView(FormView): initial["jmeno"] = osoba.plne_jmeno() initial["email"] = osoba.email return initial + + +class VyrociListView(ListView): + template_name = 'vyroci/vyroci_list.html' + model = UcastnikVyroci