def education():

    def prep(r):
        if r.method in ("create", "create.popup", "update", "update.popup"):
            # Coming from Profile page?
            person_id = get_vars.get("~.person_id", None)
            if person_id:
                field = s3db.pr_education.person_id
                field.default = person_id
                field.readable = field.writable = False

        return True
    s3.prep = prep

    return s3_rest_controller("pr", "education")

# -----------------------------------------------------------------------------
RESTful CRUD controller
dataset/ETHPy150Open sahana/eden/controllers/pr.py/education