IsaacFigNewton / SandoMatch

Sandwich recommendation site. Recommends a random sandwich based on preferred ingredients.
0 stars 0 forks source link

BE - Add reviews fields to sandwich entries #15

Closed IsaacFigNewton closed 2 weeks ago

IsaacFigNewton commented 3 weeks ago

Time estimate: 30min

As well as the number of reviews

entry = { "ingredients": { "breads": dict(), "meats": dict(), "cheeses": dict(), "vegetables": dict(), "condiments": dict(), "spices": dict() }, "cost": 0, "calories": 0, "rating": random.randint(1, 5), "dietary_tags": [],

increment for each new review,

    #   update rating by weighted sum of old and new ratings
    "review_count": 1,
    # store reviews as {rating, text} objects or maybe object ref ids?
    "reviews": []
}
IsaacFigNewton commented 2 weeks ago

Spent about 20min working on this