[cuisineaz] site changed / rewritten using browser 2

This commit is contained in:
Bezleputh 2015-08-06 19:34:07 +02:00
commit ab533ad1b7
4 changed files with 110 additions and 154 deletions

View file

@ -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