prednasky | oprava ukladani
This commit is contained in:
parent
5812ef343a
commit
70d8a18748
2 changed files with 5 additions and 4 deletions
|
@ -14,7 +14,8 @@ def newPrednaska(request):
|
|||
for i in request.POST:
|
||||
if i[0] == 'q':
|
||||
hlasovani = Hlasovani()
|
||||
hlasovani.prednaska = Prednaska.objects.filter(pk = i[1])[0]
|
||||
print(i[1])
|
||||
hlasovani.prednaska = Prednaska.objects.filter(pk = int(i[1]))[0]
|
||||
hlasovani.body = int(request.POST[i])
|
||||
hlasovani.ucastnik = jmeno
|
||||
hlasovani.save()
|
||||
|
@ -30,7 +31,7 @@ def newPrednaska(request):
|
|||
'prednasky' : prednasky,
|
||||
})
|
||||
|
||||
def Prednaska(request):
|
||||
def Prednaska_hotovo(request):
|
||||
return render(request, 'prednasky/hotovo.html')
|
||||
|
||||
|
||||
|
|
|
@ -3,14 +3,14 @@ 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
|
||||
from prednasky.views import newPrednaska, Prednaska_hotovo
|
||||
|
||||
staff_member_required = user_passes_test(lambda u: u.is_staff)
|
||||
|
||||
urlpatterns = [
|
||||
# prednasky
|
||||
url(r'^prednasky/$', newPrednaska),
|
||||
url(r'^prednasky/hotovo$', Prednaska),
|
||||
url(r'^prednasky/hotovo$', Prednaska_hotovo),
|
||||
|
||||
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'),
|
||||
|
|
Loading…
Reference in a new issue