[cuisineaz] site changed / rewritten using browser 2
This commit is contained in:
parent
c47451bd4a
commit
ab533ad1b7
4 changed files with 110 additions and 154 deletions
|
|
@ -50,15 +50,10 @@ class CuisineazModule(Module, CapRecipe):
|
|||
|
||||
def fill_recipe(self, recipe, fields):
|
||||
if 'nb_person' in fields or 'instructions' in fields:
|
||||
rec = self.get_recipe(recipe.id)
|
||||
recipe.picture_url = rec.picture_url
|
||||
recipe.instructions = rec.instructions
|
||||
recipe.ingredients = rec.ingredients
|
||||
recipe.comments = rec.comments
|
||||
recipe.author = rec.author
|
||||
recipe.nb_person = rec.nb_person
|
||||
recipe.cooking_time = rec.cooking_time
|
||||
recipe.preparation_time = rec.preparation_time
|
||||
recipe = self.browser.get_recipe(recipe.id, recipe)
|
||||
|
||||
if 'comments' in fields:
|
||||
recipe.comments = list(self.browser.get_comments(recipe.id))
|
||||
|
||||
return recipe
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue