mirror of
https://github.com/StefBuwalda/cal_counter.git
synced 2025-10-29 19:00:00 +00:00
Add food logging functionality for users
Introduces a new FoodLogForm and a /log_food/<item_id> route to allow users to log food consumption. Updates the food item route to redirect to the log page, adds a log_food.html template, and updates the Bootstrap CDN version in base.html.
This commit is contained in:
5
forms.py
5
forms.py
@@ -25,3 +25,8 @@ class FoodItemForm(FlaskForm):
|
||||
fat = FloatField("fat per 100g", validators=[InputRequired()])
|
||||
saturated_fat = FloatField("saturated_fat per 100g")
|
||||
submit = SubmitField("Add Item")
|
||||
|
||||
|
||||
class FoodLogForm(FlaskForm):
|
||||
amount = IntegerField("amount of food (g/ml)")
|
||||
submit = SubmitField("Log Item")
|
||||
|
||||
Reference in New Issue
Block a user