Example #1
0
def dispatch(request, context, state):
    # data requests are special (render json, not html)
    if state == 'data':
        context = heavylifting.getData(context, request)

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

            # if not 'items' in context:
            #     context['error'] = 'no items'
            # else:
            #     context['items'] =context['items']
            #     context['labels'] = context['labels']

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

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

            # if not 'items' in context:
            #     context['error'] = 'no items'
            # else:
            #     context['items'] =context['items']
            #     context['labels'] = context['labels']

    return context
Example #3
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
Example #4
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