def get_selector_name_from_id(cls, selector_id): jpDB = Japanese_DB_handler() f = jpDB.base_format table = f.get_table(cls.sub_url) field = f.get_field(cls.sub_url, 'name') data = jpDB.get_item_by_id(table, selector_id, field) if data: return data[0]
def get_vocab_from_selector(selector_id): jpDB = Japanese_DB_handler() f = jpDB.base_format data = jpDB.get_item_by_id(f.kanjis, selector_id, f.kanjis.name) if not data: return None selector_name = data[0] item_to_get = www_config.get_vocab_format_including_id() vocab_list = jpDB.list_word_by_kanjis(selector_name, *item_to_get) return vocab_list