class SchedulesModel(ndb.Model): """Stores scheduling data.""" Name = ndb.StringProperty(indexed=True, required=True) Timezone = ndb.StringProperty(default='UTC', choices=tz.get_all_timezones(), required=True) Schedule = ndb.JsonProperty(required=True)
def time_zones(): """ Get all time zones. :return: all time zone in the world wide world. """ return json.dumps({"Timezones": tz.get_all_timezones()})