From: Aleksander Ɓukasz Date: Mon, 20 May 2013 13:29:27 +0000 (+0200) Subject: Polls: show only open polls X-Git-Url: https://git.mdrn.pl/wolnelektury.git/commitdiff_plain/3559358bbdccb93c848a9b98c08cdf3783807558?ds=sidebyside;hp=a4bbdfca488d989c3459a7e95345686bc072be54 Polls: show only open polls --- diff --git a/apps/polls/views.py b/apps/polls/views.py index ac1c36028..c9cb5ded9 100644 --- a/apps/polls/views.py +++ b/apps/polls/views.py @@ -10,7 +10,7 @@ from forms import PollForm @require_http_methods(['GET', 'POST']) def poll(request, slug): - poll = get_object_or_404(Poll, slug = slug) + poll = get_object_or_404(Poll, slug = slug, open = True) if request.method == 'POST': redirect_to = reverse('poll', args = [slug])