Exemplo n.º 1
0
def add_by_category_key(category_key, name, image_key = None):
  category = check_get_cateogry(category_key)
  dish = Dish(restaurant_key = category.restaurant_key, category_key = category_key, name = name, img_key = image_key)
  dish.put()
  return dish
Exemplo n.º 2
0
def get_all_by_category_key(category_key):
  check_get_cateogry(category_key)
  return Dish.query(Dish.category_key == category_key).fetch()