Beispiel #1
0
def vote(request):
    if not request.user.committee:
        raise Http404('There is no user.committee')

    formset = VoteFormset(request.POST)
    if not formset.is_valid():
        raise Http404('Invalid formset')
    formset.save()

    return redirect('committee:main')
Beispiel #2
0
def vote(request):
    if not request.user.committee:
        raise Http404

    formset = VoteFormset(request.POST)
    if formset.is_valid():
        formset.save()

        return redirect('committee:main')

    raise Http404