def wrap(controller, request, *args, **kwargs):
    if (request.user and request.user.is_authenticated):
        if ('redirect' in request.GET):
            return redirect(request.GET['redirect'])
        return redirect('app.web.admin.dashboard')
    return function(controller, request, *args, **kwargs)
def wrap(controller, request, *args, **kwargs):
    if (request.user and request.user.is_authenticated):
        if ('redirect' in request.GET):
            return redirect(request.GET['redirect'])
        return redirect('app.web.admin.dashboard')
    return function(controller, request, *args, **kwargs)