def application():
    """
        Custom workflow to manually create standing applications
        for deployments (for staff/volunteers)
    """

    # Tweak settings for RDRT
    settings.hrm.staff_experience = True
    settings.hrm.use_skills = True
    settings.search.filter_manager = True

    def prep(r):
        method = r.method
        if not method and r.representation != "s3json":
            r.method = method = "select"
        if method == "select":
            r.custom_action = s3db.deploy_apply
        return True
    s3.prep = prep

    if "delete" in request.args or \
       request.env.request_method == "POST" and auth.permission.format=="s3json":
        return s3_rest_controller()
    else:
        #return s3db.hrm_human_resource_controller()
        return s3_rest_controller("hrm", "human_resource")

# -----------------------------------------------------------------------------
dataset/ETHPy150Open sahana/eden/controllers/deploy.py/application/original