def editor(url): # get recipe details if recipe is to be edited otherwise its a new recipe recipe = Recipe.get_details(request.args.get('recipe')) if url == 'edit' else False return render_template('editor.html', url=url, recipe=recipe)
def recipe(recipe, title): # get a single recipe by its id recipe = Recipe.get_details(recipe) return render_template('recipe.html', recipe=recipe)