mirror of
https://github.com/StefBuwalda/cal_counter.git
synced 2025-10-30 11:19:59 +00:00
Refactor food item nutrition field names for consistency
Standardized field names for nutritional values in FoodItem model and throughout the codebase, changing 'fats_100g' to 'fat_100', 'saturated_fats_100g' to 'saturated_fat_100', and similar updates for other fields. Updated all references in models, templates, routes, and seed data to match the new naming convention for improved clarity and consistency.
This commit is contained in:
@@ -13,8 +13,8 @@ Food Nutritional Info
|
||||
<tr>
|
||||
<th>Name</th>
|
||||
<th>Energy (kcal)</th>
|
||||
<th>Fats (g)</th>
|
||||
<th>Saturated Fats (g)</th>
|
||||
<th>fat (g)</th>
|
||||
<th>Saturated fat (g)</th>
|
||||
<th>Sugars (g)</th>
|
||||
<th>Carbs (g)</th>
|
||||
<th>Protein (g)</th>
|
||||
@@ -25,12 +25,12 @@ Food Nutritional Info
|
||||
{% for food in items %}
|
||||
<tr>
|
||||
<td class="bg-body-tertiary">{{ food.name }}</td>
|
||||
<td class="bg-body-tertiary">{{ food.energy_100g }}</td>
|
||||
<td class="bg-body-tertiary">{{ food.fats_100g }}</td>
|
||||
<td class="bg-body-tertiary">{{ food.saturated_fats_100g }}</td>
|
||||
<td class="bg-body-tertiary">{{ food.sugar_100g }}</td>
|
||||
<td class="bg-body-tertiary">{{ food.carbs_100g }}</td>
|
||||
<td class="bg-body-tertiary">{{ food.protein_100g }}</td>
|
||||
<td class="bg-body-tertiary">{{ food.energy_100 }}</td>
|
||||
<td class="bg-body-tertiary">{{ food.fat_100 }}</td>
|
||||
<td class="bg-body-tertiary">{{ food.saturated_fat_100 }}</td>
|
||||
<td class="bg-body-tertiary">{{ food.sugar_100 }}</td>
|
||||
<td class="bg-body-tertiary">{{ food.carbs_100 }}</td>
|
||||
<td class="bg-body-tertiary">{{ food.protein_100 }}</td>
|
||||
<td class="bg-body-tertiary">
|
||||
<form method="POST" action="{{ url_for('admin.delete_food', id=food.id) }}"
|
||||
onsubmit="return confirm('Are you sure you want to delete this item?');">
|
||||
|
||||
Reference in New Issue
Block a user