예제 #1
0
def Dispatch(context, request):
    # do the heavy lifting
    if   'search' in request.POST: context = heavylifting.doSearch(context, request)
    elif 'review' in request.POST: context = heavylifting.doReview(context, request)
    elif 'enumerate' in request.POST: context = heavylifting.doEnumerate(context, request)
    elif 'update' in request.POST: context = heavylifting.doUpdate(context, request)
    elif 'movecheck' in request.POST: context = heavylifting.doMovecheck(context, request)
    elif 'save' in request.POST: context = heavylifting.doSave(context, request)

    return context
예제 #2
0
def Dispatch(context, request):
    # do the heavy lifting
    if 'search' in request.POST:
        context = heavylifting.doSearch(context, request)
    elif 'review' in request.POST:
        context = heavylifting.doReview(context, request)
    elif 'enumerate' in request.POST:
        context = heavylifting.doEnumerate(context, request)
    elif 'update' in request.POST:
        context = heavylifting.doUpdate(context, request)
    elif 'movecheck' in request.POST:
        context = heavylifting.doMovecheck(context, request)
    elif 'save' in request.POST:
        context = heavylifting.doSave(context, request)

    return context
def dispatch(context, request, appname):

    # data requests are special (render json, not html)
    if appname == 'data':
        context = heavylifting.getData(context, request)

    else:
        # do the heavy lifting
        if 'search' in request.POST:
            context = heavylifting.doSearch(context, request)
        elif 'review' in request.POST:
            context = heavylifting.doReview(context, request)
        elif 'enumerate' in request.POST:
            context = heavylifting.doEnumerate(context, request)
        elif 'update' in request.POST:
            context = heavylifting.doUpdate(context, request)
        elif 'movecheck' in request.POST:
            context = heavylifting.doMovecheck(context, request)
        elif 'save' in request.POST:
            context = heavylifting.doSave(context, request)
        elif 'activity' in request.POST:
            context = heavylifting.doActivity(context, request)

    return context