Skip to content

armgit / wger

Public Imported from GitHub
0

Self hosted FLOSS fitness/workout, nutrition and weight tracker

Fix problem with template name collision

Roland Geider621f97ad332e
diff --git a/weight/templates/edit.html b/weight/templates/edit.html
index 233afa142..74ad6ce37 100644
--- a/weight/templates/edit.html
+++ b/weight/templates/edit.html
@@ -4,7 +4,7 @@
<!--
Title
-->
-{% block title %}{% trans "Exercise details" %}{% endblock %}
+{% block title %}{% trans "Weight entry" %}{% endblock %}
<!--
@@ -12,12 +12,7 @@
-->
{% block content %}
-<h2>{% if exercise.id %}
- {% trans "Edit" %} {{ exercise.name }}
- {% else %}
- {% trans "New exercise" %}
- {% endif %}
-</h2>
+<h2>{% trans "Weight entry" %}</h2>
<form action="/weight/add/{% if weight.id %}{{ weigth.id }}{% endif %}"
diff --git a/weight/templates/overview.html b/weight/templates/weight_overview.html
similarity index 100%
rename from weight/templates/overview.html
rename to weight/templates/weight_overview.html
diff --git a/weight/views.py b/weight/views.py
index e1c2b9f21..19ccc544b 100644
--- a/weight/views.py
+++ b/weight/views.py
@@ -80,4 +80,4 @@ def overview(request):
template_data['data_x'] = data_x
template_data['data_y'] = data_y
- return render_to_response('overview.html', template_data)
\ No newline at end of file
+ return render_to_response('weight_overview.html', template_data)
\ No newline at end of file
diff --git a/workout_manager/settings.py b/workout_manager/settings.py
index 694cffefc..3c2252de3 100644
--- a/workout_manager/settings.py
+++ b/workout_manager/settings.py
@@ -114,7 +114,6 @@ TEMPLATE_DIRS = (
# Always use forward slashes, even on Windows.
# Don't forget to use absolute paths, not relative paths.
'/media/multimedia/www/workout_manager/workout_manager/manager/templates',
- '/media/multimedia/www/workout_manager/workout_manager/exercises/templates'
)
INSTALLED_APPS = (
diff --git a/workout_manager/urls.py b/workout_manager/urls.py
index 616533e98..652e42bff 100644
--- a/workout_manager/urls.py
+++ b/workout_manager/urls.py
@@ -7,5 +7,5 @@ urlpatterns = patterns('',
url(r'^admin/', include(admin.site.urls)),
url(r'^', include('manager.urls')),
url(r'^', include('exercises.urls')),
- #url(r'^', include('weight.urls')),
+ url(r'^', include('weight.urls')),
)
\ No newline at end of file