def category_get(key): category = obj_or_404(Category.by_key(key)) return jsonify(category)
def category_index(): categories = Category.all() return jsonify({"results": categories, "count": len(categories)})
def category_index(): categories = Category.all() return jsonify({ 'results': categories, 'count': len(categories) })