示例#1
0
文件: views.py 项目: hanbei/carl
def list_recipes():
    recipes = db.list_recipes(g.db)
    return render_template('list_recipes.html', recipes=recipes)
示例#2
0
文件: views.py 项目: hanbei/carl
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])