@staticmethod
    def _options(fieldname):

        db = current.db
        if fieldname == "series_id":
            table = current.s3db.cms_series
            rows = db(table.deleted == False).select(table.id,
                                                     table.name)
            options = {}
            for row in rows:
                options[row.id] = row.name

        elif fieldname == "location_id":
            table = current.s3db.gis_location
            query = (table.deleted == False) & \
                    (table.level == "L1")
            # IDs converted inside widget's _options() function
            rows = db(query).select(table.id)
            options = [row.id for row in rows]

        return options

    # -------------------------------------------------------------------------
Lookup the full set of options for a Filter Widget
dataset/ETHPy150Open sahana/eden/modules/templates/ARC/controllers.py/subscriptions._options