def list_recipes(): recipes = db.list_recipes(g.db) return render_template('list_recipes.html', recipes=recipes)
def random_recipe(): recipes = db.list_recipes(g.db) random_id = random.randint(0, len(recipes) - 1) return render_template('random_recipe.html', recipe=recipes[random_id])