Esempio n. 1
0
def fill_catalog_table():
    orm = ORM()

    caches = orm.get_caches()
    shops = orm.get_shops()

    for shop in shops:
        for items in range(1, random.randrange(3, 8)):
            for index in range(random.randrange(0, len(caches))):
                gtin = caches[index].get('gtin')
                orm.add_catalog(gtin, random.randint(1, 6), shop.get('id'))
Esempio n. 2
0
def get_shop_list() -> List[Dict]:
    orm = ORM()
    shops = orm.get_shops()
    return shops