diff --git a/prednasky/forms.py b/prednasky/forms.py
new file mode 100644
index 00000000..969232e3
--- /dev/null
+++ b/prednasky/forms.py
@@ -0,0 +1,8 @@
+# coding: utf-8
+from django import forms
+
+class NewPrednaskyForm(forms.Form):
+ ucastnik = forms.CharField(label = 'Tvoje jméno', max_length = 100)
+
+
+
diff --git a/prednasky/templates/prednasky/Base.html b/prednasky/templates/prednasky/Base.html
new file mode 100644
index 00000000..6b96372b
--- /dev/null
+++ b/prednasky/templates/prednasky/Base.html
@@ -0,0 +1,40 @@
+{% extends 'base.html' %}
+
+{% load humanize %}
+{% load staticfiles %}
+
+{% block title %}
+Hlasování o přednáškách
+{% endblock %}
+
+{% block content %}
+
+
+Jak moc by ses chtěl(a) zúčastnit následujících přednášek?
+
+Obtížnost 1 je nejlehčí, 3 nejtěžší.
+
+
+
+
+{% endblock %}
diff --git a/prednasky/templates/prednasky/hotovo.html b/prednasky/templates/prednasky/hotovo.html
new file mode 100644
index 00000000..3e621b39
--- /dev/null
+++ b/prednasky/templates/prednasky/hotovo.html
@@ -0,0 +1,11 @@
+{% extends 'base.html' %}
+
+{% load humanize %}
+{% load staticfiles %}
+
+
+{% block content %}
+
+ Děkujeme.
+
+{% endblock %}
diff --git a/prednasky/views.py b/prednasky/views.py
index 91ea44a2..4d93397d 100644
--- a/prednasky/views.py
+++ b/prednasky/views.py
@@ -1,3 +1,37 @@
from django.shortcuts import render
+from prednasky.forms import NewPrednaskyForm
+from prednasky.models import Seznam, Hlasovani, Prednaska
+from django.shortcuts import HttpResponseRedirect
+
+def newPrednaska(request):
+ # zjistime k jakemu soustredeni se vaze nove vytvarena galerie
+ prednasky = Seznam.objects.first()
+ # obsluha formulare umoznujiciho multiple nahravani fotek
+ if request.method == 'POST':
+ form = NewPrednaskyForm(request.POST, request.FILES)
+ if form.is_valid():
+ jmeno = form.cleaned_data['ucastnik']
+ for i in request.POST:
+ if i[0] == 'q':
+ hlasovani = Hlasovani()
+ hlasovani.prednaska = Prednaska.objects.filter(pk = i[1])[0]
+ hlasovani.body = int(request.POST[i])
+ hlasovani.ucastnik = jmeno
+ hlasovani.save()
+
+ # presmerovani na prave vzniklou galerii
+ return HttpResponseRedirect('./hotovo')
+
+ else:
+ form = NewPrednaskyForm()
+
+ return render(request, 'prednasky/Base.html',
+ { 'form' : form,
+ 'prednasky' : prednasky,
+ })
+
+def Prednaska(request):
+ return render(request, 'prednasky/hotovo.html')
+
# Create your views here.
diff --git a/seminar/urls.py b/seminar/urls.py
index 968e5f02..ef28ae9d 100644
--- a/seminar/urls.py
+++ b/seminar/urls.py
@@ -3,10 +3,15 @@ from django.conf.urls import patterns, url
from django.contrib.auth.decorators import user_passes_test
from . import views, export
from utils import staff_member_required
+from prednasky.views import newPrednaska, Prednaska
staff_member_required = user_passes_test(lambda u: u.is_staff)
urlpatterns = [
+ # prednasky
+ url(r'^prednasky/$', newPrednaska),
+ url(r'^prednasky/hotovo$', Prednaska),
+
url(r'^co-je-MaM/organizatori/$', views.CojemamOrganizatoriView.as_view(), name='organizatori'),
url(r'^co-je-MaM/organizatori/organizovali/$', views.CojemamOrganizatoriStariView.as_view(), name='stari_organizatori'),