def show_catalog(id): databaseManager = DatabaseManager() categories = databaseManager.get_categories() items = databaseManager.get_items(id) itemcount = databaseManager.get_items_count(id) return render_template("catalog.html", categories=categories, items=items, category_id=id, itemcount=itemcount)
def get_items_by_category(id): databaseManager = DatabaseManager() items = databaseManager.get_items(id) return jsonify(items=[i.serialize for i in items])