Exemple #1
0
def conjoint(request, exp_id, pcpt_id, conjoint_id):
    request.session.update(request.POST)
    request.session['timestamps'].update({request.path:datetime.utcnow()})
    conjoint = {}
    context = {}
    if int(conjoint_id) == 0:
        for i in range(0,4,1):
            conjoint[i] = pcpt.getConjoint(i)
            destination = reverse('eyevacs.views.conjoint', args = [exp_id, pcpt_id, 1])
            context['starter'] = True
    if int(conjoint_id) == 1:
        for i in range(4,8,1):
            conjoint[i-4] = pcpt.getConjoint(i)
            destination = reverse('eyevacs.views.transit', args = [exp_id, pcpt_id])
            context['starter'] = False
    context['destination'] = destination
    context['bt_label'] = bt_label
    context['conjointtasks'] = conjoint
    context['validation'] = validation
    reqcontext = RequestContext(request, context)
    return render(request, 'eyevacs/conjoint.html', reqcontext)