def contest_vote(request, context):

    contest = context['object']

    forms = []
    forms_are_valid = True
    # question forms
    for question in contest.questions:
        form = QuestionForm(question)(request.POST or None, prefix=str(question.id))
        if not form.is_valid():
            forms_are_valid = False
        forms.append((question, form))
    # contestant form
    initial = {}
    if request.user.is_authenticated():
        initial['name'] = request.user.first_name
        initial['surname'] = request.user.last_name
        initial['email'] = request.user.email
    contestant_form = ContestantForm(request.POST or None, initial=initial)
    if not contestant_form.is_valid():
        forms_are_valid = False
    # saving contestant
    if forms_are_valid and contest.is_active():
        return contest_finish(request, context, forms, contestant_form)
    context.update({
            'forms' : forms,
            'contestant_form' : contestant_form,
            'activity_not_yet_active' : polls_settings.ACTIVITY_NOT_YET_ACTIVE,
            'activity_active' : polls_settings.ACTIVITY_ACTIVE,
            'activity_closed' : polls_settings.ACTIVITY_CLOSED
        })
    return render_to_response(
        get_templates_from_publishable('form.html', context['object']),
        context,
        context_instance=RequestContext(request)
    )