

def building():
    ' RESTful CRUD controller '
    ctable = s3db.gis_config
    config = db((config.name == 'Queens')).select(ctable.id, limitby=(0, 1)).first()
    if config:
        gis.set_config(config.id)

    def prep(r):
        if r.interactive:
            if (r.method == 'map'):
                s3db.configure('assess_building', marker_fn=building_marker_fn)
        elif (r.representation == 'geojson'):
            mtable = s3db.gis_marker
            s3db.configure('assess_building', marker_fn=building_marker_fn)
        return True
    s3.prep = prep
    return s3_rest_controller(rheader=s3db.assess_building_rheader)

dataset/ETHPy150Open sahana/eden/controllers/assess.py building/VarMisuse@22/38 `ctable`->`config`