def items_of_category_JSON(category_path): try: category = Category.get_one(category_path) items = Item.get_all(category) return jsonify(itemList=[item.serialized for item in items]) except NotFound: return json_not_found()
def show_category(category_path): category = Category.get_one(category_path) items = Item.get_all(category) return render_template('items.html', category=category, items=items)