Skip to content

armgit / wger

Public Imported from GitHub
0

Self hosted FLOSS fitness/workout, nutrition and weight tracker

Rename some templates in the nutrition app

Roland Geiderc0000c2b2bd2
diff --git a/wger/nutrition/templates/ingredient_overview.html b/wger/nutrition/templates/ingredient/overview.html
similarity index 100%
rename from wger/nutrition/templates/ingredient_overview.html
rename to wger/nutrition/templates/ingredient/overview.html
diff --git a/wger/nutrition/templates/ingredient_search.html b/wger/nutrition/templates/ingredient/search.html
similarity index 100%
rename from wger/nutrition/templates/ingredient_search.html
rename to wger/nutrition/templates/ingredient/search.html
diff --git a/wger/nutrition/templates/view_ingredient.html b/wger/nutrition/templates/ingredient/view.html
similarity index 100%
rename from wger/nutrition/templates/view_ingredient.html
rename to wger/nutrition/templates/ingredient/view.html
diff --git a/wger/nutrition/templates/edit_meal_item.html b/wger/nutrition/templates/meal_item/edit.html
similarity index 100%
rename from wger/nutrition/templates/edit_meal_item.html
rename to wger/nutrition/templates/meal_item/edit.html
diff --git a/wger/nutrition/templates/nutrition_overview.html b/wger/nutrition/templates/plan/overview.html
similarity index 100%
rename from wger/nutrition/templates/nutrition_overview.html
rename to wger/nutrition/templates/plan/overview.html
diff --git a/wger/nutrition/templates/view_nutrition_plan.html b/wger/nutrition/templates/plan/view.html
similarity index 100%
rename from wger/nutrition/templates/view_nutrition_plan.html
rename to wger/nutrition/templates/plan/view.html
diff --git a/wger/nutrition/views/ingredient.py b/wger/nutrition/views/ingredient.py
index 7e1fe305c..42dbe3f25 100644
--- a/wger/nutrition/views/ingredient.py
+++ b/wger/nutrition/views/ingredient.py
@@ -179,7 +179,7 @@ def edit_meal_item(request, id, meal_id, item_id=None):
meal_form = MealItemForm(instance=meal_item)
template_data['form'] = meal_form
- return render_to_response('edit_meal_item.html',
+ return render_to_response('meal_item/edit.html',
template_data,
context_instance=RequestContext(request))
@@ -205,7 +205,7 @@ def ingredient_overview(request):
template_data['page_range'] = pagination['page_range']
template_data['ingredients'] = pagination['page']
- return render_to_response('ingredient_overview.html',
+ return render_to_response('ingredient/overview.html',
template_data,
context_instance=RequestContext(request))
@@ -216,7 +216,7 @@ def ingredient_view(request, id, slug=None):
ingredient = get_object_or_404(Ingredient, pk=id)
template_data['ingredient'] = ingredient
- return render_to_response('view_ingredient.html',
+ return render_to_response('ingredient/view.html',
template_data,
context_instance=RequestContext(request))
@@ -308,7 +308,7 @@ def ingredient_search(request):
template_data.update(csrf(request))
template_data['ingredients'] = ingredients
template_data['search_term'] = q
- return render_to_response('ingredient_search.html',
+ return render_to_response('ingredient/search.html',
template_data,
context_instance=RequestContext(request))
diff --git a/wger/nutrition/views/plan.py b/wger/nutrition/views/plan.py
index 927657bce..2a49f4a09 100644
--- a/wger/nutrition/views/plan.py
+++ b/wger/nutrition/views/plan.py
@@ -68,7 +68,7 @@ def overview(request):
plans = NutritionPlan.objects.filter(user=request.user)
template_data['plans'] = plans
- return render_to_response('nutrition_overview.html',
+ return render_to_response('plan/overview.html',
template_data,
context_instance=RequestContext(request))
@@ -129,7 +129,7 @@ def view(request, id):
template_data['nutritional_data'] = plan.get_nutritional_values()
- return render_to_response('view_nutrition_plan.html',
+ return render_to_response('plan/view.html',
template_data,
context_instance=RequestContext(request))