def redirect_if_not_installed(function):

    def wrap(controller, request, *args, **kwargs):
        installed = (False if (Option_Entity().get_one_by_key('app_installed') is False) else True)
        if (not installed):
            return redirect('app.web.install')
        return function(controller, request, *args, **kwargs)
    return wrap
def redirect_if_not_installed(function):

    def wrap(controller, request, *args, **kwargs):
        installed = (False if (Option_Entity().get_one_by_key('app_installed') is False) else True)
        if (not installed):
            return redirect('app.web.install')
        return function(controller, request, *args, **kwargs)
    return wrap