Commit 944b9ebe authored by Christophe Siraut's avatar Christophe Siraut

Anonymous poster cannot currently choose his name.

parent 79c11a10
...@@ -78,6 +78,10 @@ def editchoices(request, poll_id): ...@@ -78,6 +78,10 @@ def editchoices(request, poll_id):
for v in votes: for v in votes:
v.save() v.save()
poll.save() poll.save()
if request.user.is_anonymous(): # Anonymous has voted...
key = 'has_voted-' + poll.id
request.session[key] = True # This writes cookie
request.session['name'] = voter # This writes cookie
return HttpResponseRedirect(reverse('meetingpoll', args=(str(poll.id),))) return HttpResponseRedirect(reverse('meetingpoll', args=(str(poll.id),)))
else: else:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment