Ejemplo n.º 1
0
def appeal(request, inforequest_slug, inforequest_pk, branch_pk, step_idx=None):
    inforequest = (Inforequest.objects
            .not_closed().owned_by(request.user).get_or_404(pk=inforequest_pk))
    branch = inforequest.branch_set.get_or_404(pk=branch_pk)

    if not branch.can_add_appeal:
        raise Http404()
    if inforequest_slug != inforequest.slug:
        return HttpResponseRedirect(reverse(u'inforequests:appeal',
                kwargs=dict(branch=branch, step_idx=step_idx)))

    return wizard_view(AppealWizard, request, step_idx, branch)
Ejemplo n.º 2
0
def obligee_action(request, inforequest_slug, inforequest_pk, step_idx=None):
    inforequest = (Inforequest.objects
            .not_closed().owned_by(request.user).get_or_404(pk=inforequest_pk))
    inforequestemail = inforequest.inforequestemail_set.undecided().oldest().get_or_none()
    email = inforequestemail.email if inforequestemail is not None else None

    if inforequest_slug != inforequest.slug:
        return HttpResponseRedirect(reverse(u'inforequests:obligee_action',
                kwargs=dict(inforequest=inforequest, step_idx=step_idx)))

    return wizard_view(ObligeeActionWizard, request, step_idx,
            inforequest, inforequestemail, email)
Ejemplo n.º 3
0
def obligee_action(request, inforequest_slug, inforequest_pk, step_idx=None):
    inforequest = (Inforequest.objects.not_closed().owned_by(
        request.user).get_or_404(pk=inforequest_pk))
    inforequestemail = inforequest.inforequestemail_set.undecided().oldest(
    ).get_or_none()
    email = inforequestemail.email if inforequestemail is not None else None

    if inforequest_slug != inforequest.slug:
        return HttpResponseRedirect(
            reverse(u'inforequests:obligee_action',
                    kwargs=dict(inforequest=inforequest, step_idx=step_idx)))

    return wizard_view(ObligeeActionWizard, request, step_idx, inforequest,
                       inforequestemail, email)
Ejemplo n.º 4
0
def appeal(request,
           inforequest_slug,
           inforequest_pk,
           branch_pk,
           step_idx=None):
    inforequest = (Inforequest.objects.not_closed().owned_by(
        request.user).get_or_404(pk=inforequest_pk))
    branch = inforequest.branch_set.get_or_404(pk=branch_pk)

    if not branch.can_add_appeal:
        raise Http404()
    if inforequest_slug != inforequest.slug:
        return HttpResponseRedirect(
            reverse(u'inforequests:appeal',
                    kwargs=dict(branch=branch, step_idx=step_idx)))

    return wizard_view(AppealWizard, request, step_idx, branch)