This commit is contained in:
Tomas Jethro Pokorny 2016-04-18 11:38:47 +02:00
parent 70d8a18748
commit 9ed60ef93f

View file

@ -14,8 +14,8 @@ def newPrednaska(request):
for i in request.POST: for i in request.POST:
if i[0] == 'q': if i[0] == 'q':
hlasovani = Hlasovani() hlasovani = Hlasovani()
print(i[1]) print("q:"+i[1:])
hlasovani.prednaska = Prednaska.objects.filter(pk = int(i[1]))[0] hlasovani.prednaska = Prednaska.objects.filter(pk = int(i[1:]))[0]
hlasovani.body = int(request.POST[i]) hlasovani.body = int(request.POST[i])
hlasovani.ucastnik = jmeno hlasovani.ucastnik = jmeno
hlasovani.save() hlasovani.save()