Self hosted FLOSS fitness/workout, nutrition and weight tracker
Use the new syntax for the URL function for Django 1.5
Roland Geider7d8c63fc962a
diff --git a/wger/exercises/templates/exercise_search.html b/wger/exercises/templates/exercise_search.htmlindex 49d272a06..0141e60a8 100644--- a/wger/exercises/templates/exercise_search.html+++ b/wger/exercises/templates/exercise_search.html@@ -1,4 +1,5 @@{% extends "base.html" %}+{% load url from future %}{% load i18n %}<!--@@ -11,7 +12,7 @@Main Content-->{% block content %}-<form action="{% url wger.exercises.views.exercise_search %}"+<form action="{% url 'wger.exercises.views.exercise_search' %}"method="get"id="exercise_search_form">{% csrf_token %}@@ -20,7 +21,7 @@<ul>{% for exercise in exercises %}- <li><a href="{% url wger.exercises.views.exercise_view exercise.id %}">{{ exercise.name }}</a></li>+ <li><a href="{% url 'wger.exercises.views.exercise_view' exercise.id %}">{{ exercise.name }}</a></li>{% endfor %}</ul>diff --git a/wger/exercises/templates/muscle_overview.html b/wger/exercises/templates/muscle_overview.htmlindex c80b55dab..d994b533d 100644--- a/wger/exercises/templates/muscle_overview.html+++ b/wger/exercises/templates/muscle_overview.html@@ -1,4 +1,5 @@{% extends "base_wide.html" %}+{% load url from future %}{% load i18n %}{% load staticfiles %}diff --git a/wger/exercises/templates/overview.html b/wger/exercises/templates/overview.htmlindex 6fef95594..3dc46c90e 100644--- a/wger/exercises/templates/overview.html+++ b/wger/exercises/templates/overview.html@@ -1,4 +1,5 @@{% extends "base.html" %}+{% load url from future %}{% load i18n %}{% load staticfiles %}@@ -25,6 +26,7 @@ $(document).ready(function() {// On selecting a category, set the values to edit itselect: function(event, ui) {category_id = ui.tab.id.match(/\d+/);+ console.log(category_id);$(".current-category-name").html($("#cat-" + category_id).html());$("#current-category-edit").attr("href", "/exercise/category/" + category_id + "/edit/");$("#current-category-delete").attr("href", "/exercise/category/" + category_id + "/delete/");@@ -36,7 +38,7 @@ $(document).ready(function() {// Init the autocompleter$("#exercise-search").catcomplete({- source: "{% url wger.exercises.views.exercise_search %}",+ source: "{% url 'wger.exercises.views.exercise_search' %}",minLength: 2,select: function(event, ui) {@@ -75,7 +77,7 @@ $(document).ready(function() {<td style="text-align:right;">{% if perms.exercises %}<div class="editoptions">- <a href="{% url exercise-edit exercise.id %}"+ <a href="{% url 'exercise-edit' exercise.id %}"title="{% trans 'Edit' %}"><img src="{% static 'images/icons/edit.svg' %}"width="16"@@ -83,7 +85,7 @@ $(document).ready(function() {alt="{% trans 'Edit' %}"></a>- <a href="{% url exercise-delete exercise.id %}"+ <a href="{% url 'exercise-delete' exercise.id %}"title="{% trans 'Delete' %}"class="delete-exercise modal-dialog"><img src="{% static 'images/icons/trash.svg' %}"@@ -121,7 +123,7 @@ $(document).ready(function() {<h3>{% trans "Options" %}</h3><p>- <a href="{% url exercise-add %}"+ <a href="{% url 'exercise-add' %}"class="modal-dialog"><img src="{% static 'images/icons/new.svg' %}"width="32"@@ -133,7 +135,7 @@ $(document).ready(function() {</p><p>{% with category=categories|first %}- <a href="{% url exercisecategory-edit category.id %}"+ <a href="{% url 'exercisecategory-edit' category.id %}"class="modal-dialog"id="current-category-edit"><img src="{% static 'images/icons/edit.svg' %}"@@ -148,7 +150,7 @@ $(document).ready(function() {</p><p>{% with category=categories|first %}- <a href="{% url exercisecategory-delete category.id %}"+ <a href="{% url 'exercisecategory-delete' category.id %}"class="modal-dialog"id="current-category-delete"><img src="{% static 'images/icons/trash.svg' %}"@@ -162,7 +164,7 @@ $(document).ready(function() {{% endwith %}</p><p>- <a href="{% url exercisecategory-add %}"+ <a href="{% url 'exercisecategory-add' %}"class="modal-dialog"><img src="{% static 'images/icons/folder-new.svg' %}"width="32"@@ -177,7 +179,7 @@ $(document).ready(function() {<h3>{% trans "Search" %}</h3><div class="ui-widget">- <form action="{% url wger.exercises.views.exercise_search %}"+ <form action="{% url 'wger.exercises.views.exercise_search' %}"method="get"id="exercise_search_form">{% csrf_token %}diff --git a/wger/exercises/templates/view.html b/wger/exercises/templates/view.htmlindex 614690a1c..89b74f481 100644--- a/wger/exercises/templates/view.html+++ b/wger/exercises/templates/view.html@@ -1,4 +1,5 @@{% extends "base.html" %}+{% load url from future %}{% load i18n %}{% load staticfiles %}{% load manager_extras %}@@ -42,14 +43,14 @@ function custom_modal_init(){{ comment }}{% if perms.exercises %}<span class="editoptions">- <a href="{% url wger.exercises.views.exercisecomment_delete comment.id %}"+ <a href="{% url 'wger.exercises.views.exercisecomment_delete' comment.id %}"title="{% trans 'Delete' %}"><img src="{% static 'images/icons/trash.svg' %}"width="16"height="16"alt="{% trans 'Delete' %}"></a>- <a href="{% url exercisecomment-edit comment.id %}"+ <a href="{% url 'exercisecomment-edit' comment.id %}"title="{% trans 'Edit' %}"class="modal-dialog"><img src="{% static 'images/icons/edit.svg' %}"@@ -68,7 +69,7 @@ function custom_modal_init(){% if perms.exercises %}<p>- <a href="{% url exercisecomment-add exercise.id %}"+ <a href="{% url 'exercisecomment-add' exercise.id %}"title="{% trans 'Add' %}"class="modal-dialog"><img src="{% static 'images/icons/add.svg' %}"@@ -108,7 +109,7 @@ weight_log_chart({{json|safe}}, "{{svg_uuid}}", "{{reps}}")<h3>{% trans "Back to overview" %}</h3><p>- <a href="{% url wger.exercises.views.exercise_overview %}">+ <a href="{% url 'wger.exercises.views.exercise_overview' %}"><img src="{% static 'images/icons/list.svg' %}"width="32"height="32"@@ -207,7 +208,7 @@ weight_log_chart({{json|safe}}, "{{svg_uuid}}", "{{reps}}"){% if perms.exercises %}<h3>{% trans "Options" %}</h3><p>- <a href="{% url exercise-edit exercise.id %}">+ <a href="{% url 'exercise-edit' exercise.id %}"><img src="{% static 'images/icons/edit.svg' %}"width="32"height="32"@@ -217,7 +218,7 @@ weight_log_chart({{json|safe}}, "{{svg_uuid}}", "{{reps}}")</a></p><p>- <a href="{% url exercise-delete exercise.id %}"+ <a href="{% url 'exercise-delete' exercise.id %}"class="modal-dialog"><img src="{% static 'images/icons/trash.svg' %}"width="32"diff --git a/wger/manager/templates/day/log.html b/wger/manager/templates/day/log.htmlindex 9b95c18b2..0e39b4df4 100644--- a/wger/manager/templates/day/log.html+++ b/wger/manager/templates/day/log.html@@ -1,4 +1,5 @@{% extends "base.html" %}+{% load url from future %}{% load i18n %}{% load staticfiles %}{% load manager_extras %}@@ -71,7 +72,7 @@ $(document).ready(function () {<div class="box warning" id="weight-box-warning">{% trans "Add exercises to this training day before adding a log." %}- <a href="{% url workout-view day.training.id %}">+ <a href="{% url 'workout-view' day.training.id %}">{% trans "Back to workout" %}</a>@@ -96,7 +97,7 @@ $(document).ready(function () {{% block sidebar %}<h3>{% trans "Options" %}</h3><p>-<a href="{% url workout-view day.training.id %}">+<a href="{% url 'workout-view' day.training.id %}"><img src="{% static 'images/icons/list.svg' %}"width="32"height="32"diff --git a/wger/manager/templates/index.html b/wger/manager/templates/index.htmlindex b4b4f682c..966eddbcb 100644--- a/wger/manager/templates/index.html+++ b/wger/manager/templates/index.html@@ -1,4 +1,5 @@{% extends "base.html" %}+{% load url from future %}{% load i18n %}{% load staticfiles %}@@ -11,7 +12,7 @@<div class="ym-gbox-left"><h3>{% trans "Workout"%}</h3>{% if current_workout %}- <a href="{% url wger.manager.views.view_workout current_workout.id %}">+ <a href="{% url 'wger.manager.views.view_workout' current_workout.id %}">{% if current_workout.comment %}{{ current_workout.comment }}{% else %}@@ -48,7 +49,7 @@<h3>{% trans "Nutrition plan"%}</h3>{% if plan %}- <a href="{% url wger.nutrition.views.view plan.id %}">+ <a href="{% url 'wger.nutrition.views.view' plan.id %}">{% if plan.description %}{{ plan.description }}{% else %}@@ -90,7 +91,7 @@<div class="ym-g50 ym-gl"><div class="ym-gbox-left"><p>- <a href="{% url wger.manager.views.add %}">+ <a href="{% url 'wger.manager.views.add' %}"><img src="{% static 'images/icons/new.svg' %}"width="32"height="32"@@ -103,7 +104,7 @@<div class="ym-g50 ym-gr"><div class="ym-gbox-right"><p>- <a href="{% url wger.nutrition.views.add %}">+ <a href="{% url 'wger.nutrition.views.add' %}"><img src="{% static 'images/icons/new.svg' %}"width="32"height="32"@@ -125,7 +126,7 @@{% block sidebar %}<h3>{% trans "Options" %}</h3><p>-<a href="{% url wger.manager.views.preferences %}">+<a href="{% url 'wger.manager.views.preferences' %}"><img src="{% static 'images/icons/preferences.svg' %}"width="32"height="32"diff --git a/wger/manager/templates/set/edit.html b/wger/manager/templates/set/edit.htmlindex 90f13fcf5..1475cf8c5 100644--- a/wger/manager/templates/set/edit.html+++ b/wger/manager/templates/set/edit.html@@ -1,4 +1,5 @@{% extends "base.html" %}+{% load url from future %}{% load i18n %}{% load staticfiles %}{% load manager_extras %}@@ -25,7 +26,7 @@ function custom_page_init()Main Content-->{% block content %}-<form action="{% url wger.manager.views.edit_set workout.id day.id set.id %}"+<form action="{% url 'wger.manager.views.edit_set' workout.id day.id set.id %}"method="post"class="ym-form">diff --git a/wger/manager/templates/setting/ajax_edit.html b/wger/manager/templates/setting/ajax_edit.htmlindex 52a5e2768..62c648185 100644--- a/wger/manager/templates/setting/ajax_edit.html+++ b/wger/manager/templates/setting/ajax_edit.html@@ -1,4 +1,5 @@{% load i18n %}+{% load url from future %}{% load manager_extras %}<script>@@ -10,7 +11,7 @@ $(document).ready(function() {});</script>-<form action="{% url wger.manager.views.api_edit_set %}?do=edit_set&set={{set.id}}&exercise={{exercise.id}}"+<form action="{% url 'wger.manager.views.api_edit_set' %}?do=edit_set&set={{set.id}}&exercise={{exercise.id}}"method="post"class="ajax-form-set-edit">{% csrf_token %}diff --git a/wger/manager/templates/setting/edit.html b/wger/manager/templates/setting/edit.htmlindex 5bc8e074f..1d75fe9c0 100644--- a/wger/manager/templates/setting/edit.html+++ b/wger/manager/templates/setting/edit.html@@ -1,4 +1,5 @@{% extends "base.html" %}+{% load url from future %}{% load i18n %}{% load manager_extras %}@@ -17,7 +18,7 @@<h2>{% trans "Edit" %} {{ day.description }}</h2>-<form action="{% url wger.manager.views.edit_setting workout.id set.id exercise.id None %}"+<form action="{% url 'wger.manager.views.edit_setting' workout.id set.id exercise.id None %}"method="post"class="ym-form">{% csrf_token %}diff --git a/wger/manager/templates/tags/render_day.html b/wger/manager/templates/tags/render_day.htmlindex 0a3cd8ebf..cf5e1a1b2 100644--- a/wger/manager/templates/tags/render_day.html+++ b/wger/manager/templates/tags/render_day.html@@ -1,4 +1,5 @@{% load i18n %}+{% load url from future %}{% load staticfiles %}{% load manager_extras %}@@ -31,14 +32,14 @@ $(document).ready(function() {<span class="editoptions" style="float: right;">- <a href="{% url wger.manager.views.delete_day workout.id day.id %}"+ <a href="{% url 'wger.manager.views.delete_day' workout.id day.id %}"title="{% trans 'Delete' %}"><img src="{% static 'images/icons/trash.svg' %}"width="22"height="22"alt="{% trans 'Delete' %}"></a>- <a href="{% url day-edit day.id %}"+ <a href="{% url 'day-edit' day.id %}"title="{% trans 'Edit' %}"class="modal-dialog"><img src="{% static 'images/icons/edit.svg' %}"@@ -46,7 +47,7 @@ $(document).ready(function() {height="22"alt="{% trans 'Edit' %}"></a>- <a href="{% url day-log day.id %}"+ <a href="{% url 'day-log' day.id %}"title="{% trans 'Add weight log to this day' %}"><img src="{% static 'images/icons/statistics.svg' %}"width="22"@@ -63,7 +64,7 @@ $(document).ready(function() {<td class="ym-g10">{{ forloop.counter }}<span class="editoptions set-options">- <a href="{% url wger.manager.views.edit_set workout.id day.id set.id %}"+ <a href="{% url 'wger.manager.views.edit_set' workout.id day.id set.id %}"title="{% trans 'Edit' %}"><img src="{% static 'images/icons/edit.svg' %}"width="16"@@ -78,7 +79,7 @@ $(document).ready(function() {alt="{% trans 'Move me' %}"title="{% trans 'Move me' %}"class="dragndrop-handle">- <a href="{% url wger.manager.views.delete_set workout.id day.id set.id %}"+ <a href="{% url 'wger.manager.views.delete_set' workout.id day.id set.id %}"title="{% trans 'Delete' %}"><img src="{% static 'images/icons/trash.svg' %}"width="16"@@ -122,7 +123,7 @@ $(document).ready(function() {{% empty %}<div class="box warning">{% trans "This exercise has no settings." %}- <a href="{% url wger.manager.views.edit_setting workout.id set.id exercise.id None %}"+ <a href="{% url 'wger.manager.views.edit_setting' workout.id set.id exercise.id None %}"class="ajax-set-edit">{% trans "Edit them now."%}</a>@@ -131,7 +132,7 @@ $(document).ready(function() {</span><span class="editoptions">- <a href="{% url wger.manager.views.edit_setting workout.id set.id exercise.id None %}"+ <a href="{% url 'wger.manager.views.edit_setting' workout.id set.id exercise.id None %}"title="{% trans 'Edit' %}"class="ajax-set-edit"><img src="{% static 'images/icons/edit.svg' %}"@@ -160,7 +161,7 @@ $(document).ready(function() {<td colspan="2"><div class="box warning">{% trans "No sets for this day." %}- <a href="{% url wger.manager.views.edit_set workout.id day.id None %}"+ <a href="{% url 'wger.manager.views.edit_set' workout.id day.id None %}"class="modal-dialog">{% trans "Add one now." %}</a></div>@@ -169,7 +170,7 @@ $(document).ready(function() {</tr><tr><td colspan="2">- <a href="{% url wger.manager.views.edit_set workout.id day.id None %}"+ <a href="{% url 'wger.manager.views.edit_set' workout.id day.id None %}"class="modal-dialog">{% trans "Add workout set" %}</a></td></tr>diff --git a/wger/manager/templates/template.html b/wger/manager/templates/template.htmlindex 381b97cfe..d7289a983 100644--- a/wger/manager/templates/template.html+++ b/wger/manager/templates/template.html@@ -1,5 +1,6 @@<!DOCTYPE html>{% load i18n %}+{% load url from future %}{% load staticfiles %}<html lang="{{language.short_name}}"><head>@@ -88,48 +89,48 @@<ul class="nav"><li {% if active_tab == 'user' %}class="active"{% endif %}>{% if not user.is_authenticated %}- <a href="{% url login %}">{% trans "Login" %}</a>+ <a href="{% url 'login' %}">{% trans "Login" %}</a>{% else %}- <a href="{% url index %}">{% trans "Dashboard" %}</a>+ <a href="{% url 'index' %}">{% trans "Dashboard" %}</a>{% endif %}</li>{% if user.is_authenticated %}- <li {% if active_tab == 'workout' %}class="active"{% endif %}><a href="{% url wger.manager.views.overview %}">{% trans "Workouts" %}</a></li>+ <li {% if active_tab == 'workout' %}class="active"{% endif %}><a href="{% url 'wger.manager.views.overview' %}">{% trans "Workouts" %}</a></li>{% endif %}<li class="dropdown {% if active_tab == 'exercises' %}active{% endif %}">- <a href="{% url wger.exercises.views.exercise_overview %}"+ <a href="{% url 'wger.exercises.views.exercise_overview' %}"class="dropdown-toggle"data-toggle="dropdown">{% trans "Exercises" %} <b class="caret"></b></a><ul class="dropdown-menu">- <li><a href="{% url wger.exercises.views.exercise_overview %}">{% trans "Exercises" %}</a></li>- <li><a href="{% url muscle-overview %}">{% trans "Muscle overview" %}</a></li>+ <li><a href="{% url 'wger.exercises.views.exercise_overview' %}">{% trans "Exercises" %}</a></li>+ <li><a href="{% url 'muscle-overview' %}">{% trans "Muscle overview" %}</a></li></ul></li>{% if user.is_authenticated %}<li class="dropdown{% if active_tab == 'weight' %} active{% endif %}">- <a href="{% url wger.weight.views.overview %}"+ <a href="{% url 'wger.weight.views.overview' %}"class="dropdown-toggle"data-toggle="dropdown">{% trans "Weight" %} <b class="caret"></b></a><ul class="dropdown-menu">- <li><a href="{% url wger.weight.views.overview %}">{% trans "Weight overview" %} </a></li>- <li><a href="{% url weight-add %}">{% trans "Add weight entry" %}</a></li>+ <li><a href="{% url 'wger.weight.views.overview' %}">{% trans "Weight overview" %} </a></li>+ <li><a href="{% url 'weight-add' %}">{% trans "Add weight entry" %}</a></li></ul></li>{% endif %}<li class="dropdown {% if active_tab == 'nutrition' %}active{% endif %}">- <a href="{% url wger.nutrition.views.overview %}"+ <a href="{% url 'wger.nutrition.views.overview' %}"class="dropdown-toggle"data-toggle="dropdown">{% trans "Nutrition" %} <b class="caret"></b></a><ul class="dropdown-menu">{% if user.is_authenticated %}- <li><a href="{% url wger.nutrition.views.overview %}">{% trans "Nutrition plans" %} </a></li>+ <li><a href="{% url 'wger.nutrition.views.overview' %}">{% trans "Nutrition plans" %} </a></li>{% endif %}- <li><a href="{% url wger.nutrition.views.ingredient_overview %}">{% trans "Ingredient overview" %}</a></li>+ <li><a href="{% url 'wger.nutrition.views.ingredient_overview' %}">{% trans "Ingredient overview" %}</a></li></ul></li>@@ -140,17 +141,17 @@class="dropdown-toggle"data-toggle="dropdown">{% trans "About this software" %} <b class="caret"></b></a><ul class="dropdown-menu">- <li><a href="{% url software:features %}">{% trans "Features" %}</a></li>+ <li><a href="{% url 'software:features' %}">{% trans "Features" %}</a></li>{% if not user.is_authenticated %}- <li><a href="{% url demo-account %}">{% trans "Demo account" %} </a></li>+ <li><a href="{% url 'demo-account' %}">{% trans "Demo account" %} </a></li>{% endif %}- <li><a href="{% url software:issues %}">{% trans "Report problem" %} </a></li>+ <li><a href="{% url 'software:issues' %}">{% trans "Report problem" %} </a></li><li class="divider"></li><li class="nav-header">{% trans "Developers" %}</li>- <li><a href="{% url software:code %}">{% trans "Get the code" %} </a></li>- <li><a href="{% url software:license %}">{% trans "License" %} </a></li>- <li><a href="{% url software:changelog %}">{% trans "Changelog" %} </a></li>+ <li><a href="{% url 'software:code' %}">{% trans "Get the code" %} </a></li>+ <li><a href="{% url 'software:license' %}">{% trans "License" %} </a></li>+ <li><a href="{% url 'software:changelog' %}">{% trans "Changelog" %} </a></li></ul></li></ul>@@ -164,12 +165,12 @@<ul class="dropdown-menu">{% if user.is_authenticated %}<li>- <a href="{% url wger.manager.views.logout %}" id="logout" class="browserid-logout">+ <a href="{% url 'wger.manager.views.logout' %}" id="logout" class="browserid-logout">{% trans 'Logout' %}</a></li><li>- <a href="{% url wger.manager.views.preferences %}">+ <a href="{% url 'wger.manager.views.preferences' %}">{% trans 'My preferences' %}</a></li>diff --git a/wger/manager/templates/user/change_password.html b/wger/manager/templates/user/change_password.htmlindex bb8189a3e..6c8ea078d 100644--- a/wger/manager/templates/user/change_password.html+++ b/wger/manager/templates/user/change_password.html@@ -1,4 +1,5 @@{% extends "base.html" %}+{% load url from future %}{% load i18n %}{% load manager_extras %}@@ -6,7 +7,7 @@{% block content %}-<form action="{% url change-password %}"+<form action="{% url 'change-password' %}"method="post"class="ym-form">{% csrf_token %}diff --git a/wger/manager/templates/user/login.html b/wger/manager/templates/user/login.htmlindex c893667b6..77aad776d 100644--- a/wger/manager/templates/user/login.html+++ b/wger/manager/templates/user/login.html@@ -1,4 +1,5 @@{% extends "base.html" %}+{% load url from future %}{% load i18n %}{% load staticfiles %}{% load manager_extras %}@@ -12,7 +13,7 @@{% block content %}{% if not user.is_authenticated %}-<form action="{% url login %}"+<form action="{% url 'login' %}"method="post"class="ym-form">{% csrf_token %}@@ -42,7 +43,7 @@data-site-name="Workout Manager"><span>{% trans "Sign in with your Email" %}</span></a>- <form method="POST" action="{% url browserid_verify %}" id="browserid-form">+ <form method="POST" action="{% url 'browserid_verify' %}" id="browserid-form">{% csrf_token %}{{ browserid_form.as_p }}</form>@@ -64,7 +65,7 @@{% block sidebar %}<h3>{% trans "No account?" %}</h3><p>- <a href="{% url wger.manager.views.registration %}">+ <a href="{% url 'wger.manager.views.registration' %}"><img src="{% static 'images/icons/register.svg' %}"width="48"height="48"@@ -73,7 +74,7 @@</p><p>- <a href="{% url demo-account %}">+ <a href="{% url 'demo-account' %}"><img src="{% static 'images/icons/star.svg' %}"width="48"height="48"@@ -83,7 +84,7 @@<h3>{% trans "Forgot password?" %}</h3><p>- <a href="{% url django.contrib.auth.views.password_reset %}">+ <a href="{% url 'django.contrib.auth.views.password_reset' %}"><img src="{% static 'images/icons/reset-password.svg' %}"width="48"height="48"diff --git a/wger/manager/templates/user/preferences.html b/wger/manager/templates/user/preferences.htmlindex 122899b51..165888c09 100644--- a/wger/manager/templates/user/preferences.html+++ b/wger/manager/templates/user/preferences.html@@ -1,4 +1,5 @@{% extends "base.html" %}+{% load url from future %}{% load i18n %}{% load staticfiles %}{% load manager_extras %}@@ -7,7 +8,7 @@{% block content %}-<form action="{% url wger.manager.views.preferences %}"+<form action="{% url 'wger.manager.views.preferences' %}"method="post"class="ym-form">{% csrf_token %}@@ -37,7 +38,7 @@{% block sidebar %}<h3>{% trans "Options" %}</h3><p>- <a href="{% url wger.manager.views.logout %}">+ <a href="{% url 'wger.manager.views.logout' %}"><img src="{% static 'images/icons/logout.svg' %}"width="32"height="32"@@ -46,7 +47,7 @@{% trans "Logout" %}</a></p><p>- <a href="{% url change-password %}">+ <a href="{% url 'change-password' %}"><img src="{% static 'images/icons/preferences.svg' %}"width="32"height="32"diff --git a/wger/manager/templates/workout/log.html b/wger/manager/templates/workout/log.htmlindex 34f1c1673..9b3833f28 100644--- a/wger/manager/templates/workout/log.html+++ b/wger/manager/templates/workout/log.html@@ -1,4 +1,5 @@{% extends "base.html" %}+{% load url from future %}{% load i18n %}{% load staticfiles %}{% load manager_extras %}@@ -29,7 +30,7 @@ function custom_modal_init()<h3>{{ day.description }}</h3><p>-<a href="{% url day-log day.id %}"+<a href="{% url 'day-log' day.id %}"title="{% trans 'Add weight log to this day' %}"><img src="{% static 'images/icons/statistics.svg' %}"width="32"@@ -76,7 +77,7 @@ function custom_modal_init(){% block sidebar %}<h3>{% trans "Options" %}</h3><p>-<a href="{% url workout-view workout.id %}">+<a href="{% url 'workout-view' workout.id %}"><img src="{% static 'images/icons/list.svg' %}"width="32"height="32"diff --git a/wger/manager/templates/workout/overview.html b/wger/manager/templates/workout/overview.htmlindex 440d830ad..cdeace25c 100644--- a/wger/manager/templates/workout/overview.html+++ b/wger/manager/templates/workout/overview.html@@ -1,4 +1,5 @@{% extends "base.html" %}+{% load url from future %}{% load i18n %}{% load staticfiles %}@@ -18,7 +19,7 @@{% for workout in workouts %}<tr><td>- <a href="{% url wger.manager.views.view_workout workout.id %}">+ <a href="{% url 'wger.manager.views.view_workout' workout.id %}">{% if workout.comment %}{{ workout.comment }}{% else %}@@ -46,7 +47,7 @@{% block sidebar %}<h3>{% trans "Options" %}</h3><p>- <a href="{% url wger.manager.views.add %}">+ <a href="{% url 'wger.manager.views.add' %}"><img src="{% static 'images/icons/new.svg' %}"width="32"height="32"diff --git a/wger/manager/templates/workout/view.html b/wger/manager/templates/workout/view.htmlindex c2d6067dd..fa7e30c38 100644--- a/wger/manager/templates/workout/view.html+++ b/wger/manager/templates/workout/view.html@@ -1,4 +1,5 @@{% extends "base.html" %}+{% load url from future %}{% load i18n %}{% load staticfiles %}{% load manager_extras %}@@ -48,7 +49,7 @@ $(document).ready(function() {{% empty %}<div class="box warning">{% trans "No days for this workout." %}- <a href="{% url day-add workout.id %}" class="modal-dialog">+ <a href="{% url 'day-add' workout.id %}" class="modal-dialog">{% trans "Add training day." %}</a></div>@@ -56,12 +57,12 @@ $(document).ready(function() {<p>-<a href="{% url day-add workout.id %}" class="modal-dialog">+<a href="{% url 'day-add' workout.id %}" class="modal-dialog">{% trans "Add training day" %}</a>|-<a id="exercise-comments-toggle" href="{% url wger.manager.views.preferences %}">+<a id="exercise-comments-toggle" href="{% url 'wger.manager.views.preferences' %}">{% trans "Show/Hide exercise comments" %}</a>@@ -114,7 +115,7 @@ $(document).ready(function() {<h3>{% trans "Options" %}</h3><p>-<a href="{% url wger.manager.pdf.workout_log workout.id %}"+<a href="{% url 'wger.manager.pdf.workout_log' workout.id %}"target="_blank"><img src="{% static 'images/icons/save.svg' %}"width="32"@@ -126,7 +127,7 @@ $(document).ready(function() {</p><p>-<a href="{% url workout-edit workout.id %}"+<a href="{% url 'workout-edit' workout.id %}"class="modal-dialog"><img src="{% static 'images/icons/edit.svg' %}"width="32"@@ -138,7 +139,7 @@ $(document).ready(function() {</p><p>-<a href="{% url workout-log workout.id %}">+<a href="{% url 'workout-log' workout.id %}"><img src="{% static 'images/icons/statistics.svg' %}"width="32"height="32"@@ -149,7 +150,7 @@ $(document).ready(function() {</p><p>-<a href="{% url workout-copy workout.id %}"+<a href="{% url 'workout-copy' workout.id %}"class="modal-dialog"><img src="{% static 'images/icons/copy.svg' %}"width="32"@@ -162,7 +163,7 @@ $(document).ready(function() {<p>-<a href="{% url workout-delete workout.id %}"+<a href="{% url 'workout-delete' workout.id %}"class="modal-dialog"><img src="{% static 'images/icons/trash.svg' %}"width="32"diff --git a/wger/nutrition/templates/edit_meal_item.html b/wger/nutrition/templates/edit_meal_item.htmlindex 0d2ab6065..2d686d7f2 100644--- a/wger/nutrition/templates/edit_meal_item.html+++ b/wger/nutrition/templates/edit_meal_item.html@@ -1,4 +1,5 @@{% extends "base.html" %}+{% load url from future %}{% load i18n %}{% load staticfiles %}{% load manager_extras %}@@ -23,7 +24,7 @@ $(document).ready(function() {<h2>{% trans "Edit meal item" %}</h2>-<form action="{% url wger.nutrition.views.edit_meal_item plan.id meal.id meal_item.id%}{% if js_active %}?js=on{% endif %}"+<form action="{% url 'wger.nutrition.views.edit_meal_item' plan.id meal.id meal_item.id%}{% if js_active %}?js=on{% endif %}"method="post"class="ym-form">{% csrf_token %}diff --git a/wger/nutrition/templates/ingredient_overview.html b/wger/nutrition/templates/ingredient_overview.htmlindex 878b03eba..0274ddbc3 100644--- a/wger/nutrition/templates/ingredient_overview.html+++ b/wger/nutrition/templates/ingredient_overview.html@@ -1,4 +1,5 @@{% extends "base.html" %}+{% load url from future %}{% load i18n %}{% load staticfiles %}{% load manager_extras %}@@ -33,7 +34,7 @@{% if perms.exercises %}<h3>{% trans "Options" %}</h3><p>- <a href="{% url ingredient-add %}">+ <a href="{% url 'ingredient-add' %}"><img src="{% static 'images/icons/new.svg' %}"width="32"height="32"diff --git a/wger/nutrition/templates/ingredient_search.html b/wger/nutrition/templates/ingredient_search.htmlindex c7759115f..49867075b 100644--- a/wger/nutrition/templates/ingredient_search.html+++ b/wger/nutrition/templates/ingredient_search.html@@ -1,4 +1,5 @@{% extends "base.html" %}+{% load url from future %}{% load i18n %}<!--@@ -14,7 +15,7 @@<h2>{% trans "Search results" %} - "{{ search_term }}"</h2>-<form action="{% url wger.nutrition.views.ingredient_search %}"+<form action="{% url 'wger.nutrition.views.ingredient_search' %}"method="get"id="ingredient_search_form">{% csrf_token %}@@ -23,7 +24,7 @@<ul>{% for ingredient in ingredients %}- <li><a href="{% url wger.nutrition.views.ingredient_view ingredient.id %}">{{ ingredient.name }}</a></li>+ <li><a href="{% url 'wger.nutrition.views.ingredient_view' ingredient.id %}">{{ ingredient.name }}</a></li>{% endfor %}</ul>diff --git a/wger/nutrition/templates/nutrition_overview.html b/wger/nutrition/templates/nutrition_overview.htmlindex 521777c63..ecb8bcd33 100644--- a/wger/nutrition/templates/nutrition_overview.html+++ b/wger/nutrition/templates/nutrition_overview.html@@ -1,4 +1,5 @@{% extends "base.html" %}+{% load url from future %}{% load i18n %}{% load staticfiles %}@@ -18,7 +19,7 @@{% for plan in plans %}<tr><td>- <a href="{% url wger.nutrition.views.view plan.id %}">+ <a href="{% url 'wger.nutrition.views.view' plan.id %}">{% if plan.description %}{{ plan.description }}{% else %}@@ -46,7 +47,7 @@{% block sidebar%}<h3>{% trans "Options" %}</h3><p>- <a href="{% url wger.nutrition.views.add %}" id="nutrition-create-new">+ <a href="{% url 'wger.nutrition.views.add' %}" id="nutrition-create-new"><img src="{% static 'images/icons/new.svg' %}"width="32"height="32"@@ -56,7 +57,7 @@</p><p>- <a href="{% url wger.nutrition.views.ingredient_overview %}" id="ingredient-overview">+ <a href="{% url 'wger.nutrition.views.ingredient_overview' %}" id="ingredient-overview"><img src="{% static 'images/icons/list.svg' %}"width="32"height="32"diff --git a/wger/nutrition/templates/view_ingredient.html b/wger/nutrition/templates/view_ingredient.htmlindex 20bf65703..84702e81b 100644--- a/wger/nutrition/templates/view_ingredient.html+++ b/wger/nutrition/templates/view_ingredient.html@@ -1,4 +1,5 @@{% extends "base.html" %}+{% load url from future %}{% load i18n %}{% load staticfiles %}{% load manager_extras %}@@ -78,7 +79,7 @@<h3>{% trans "Options" %}</h3><p>-<a href="{% url ingredient-delete ingredient.id %}"+<a href="{% url 'ingredient-delete' ingredient.id %}"title="{% trans 'Delete ingredient' %}"class="modal-dialog"><img src="{% static 'images/icons/trash.svg' %}"@@ -91,7 +92,7 @@</p><p>-<a href="{% url ingredient-edit ingredient.id %}"+<a href="{% url 'ingredient-edit' ingredient.id %}"title="{% trans 'Edit ingredient' %}"><img src="{% static 'images/icons/edit.svg' %}"width="32"diff --git a/wger/nutrition/templates/view_nutrition_plan.html b/wger/nutrition/templates/view_nutrition_plan.htmlindex f9fba947d..30694a74f 100644--- a/wger/nutrition/templates/view_nutrition_plan.html+++ b/wger/nutrition/templates/view_nutrition_plan.html@@ -1,4 +1,5 @@{% extends "base.html" %}+{% load url from future %}{% load i18n %}{% load staticfiles %}@@ -60,7 +61,7 @@ $(document).ready(function() {{% if meal.time %} – {{meal.time|time:"H:i"}}{% endif %}<div class="editoptions">- <a href="{% url wger.nutrition.views.delete_meal meal.id %}"+ <a href="{% url 'wger.nutrition.views.delete_meal' meal.id %}"title="{% trans 'Delete' %}"><img src="{% static 'images/icons/trash.svg' %}"width="16"@@ -68,7 +69,7 @@ $(document).ready(function() {alt="{% trans 'Delete meal' %}"title="{% trans 'Delete meal' %}"></a>- <a href="{% url meal-edit meal.id %}"+ <a href="{% url 'meal-edit' meal.id %}"title="{% trans 'Edit' %}"class="modal-dialog"><img src="{% static 'images/icons/edit.svg' %}"@@ -77,7 +78,7 @@ $(document).ready(function() {alt="{% trans 'Edit meal' %}"title="{% trans 'Edit meal' %}"></a>- <a href="{% url wger.nutrition.views.edit_meal_item plan.id meal.id None %}"+ <a href="{% url 'wger.nutrition.views.edit_meal_item' plan.id meal.id None %}"title="{% trans 'Add' %}"class="modal-dialog edit-meal"><img src="{% static 'images/icons/add.svg' %}"@@ -101,7 +102,7 @@ $(document).ready(function() {{{ item.ingredient.name }}<span class="editoptions">- <a href="{% url wger.nutrition.views.delete_meal_item item.id %}"+ <a href="{% url 'wger.nutrition.views.delete_meal_item' item.id %}"title="{% trans 'Delete' %}"class="delete-mealitem"><img src="{% static 'images/icons/trash.svg' %}"@@ -109,7 +110,7 @@ $(document).ready(function() {height="16"alt="{% trans 'Delete' %}"></a>- <a href="{% url wger.nutrition.views.edit_meal_item plan.id meal.id item.id %}"+ <a href="{% url 'wger.nutrition.views.edit_meal_item' plan.id meal.id item.id %}"title="{% trans 'Edit' %}"class="modal-dialog edit-meal edit-mealitem"><img src="{% static 'images/icons/edit.svg' %}"@@ -122,7 +123,7 @@ $(document).ready(function() {{% empty %}<div class="box warning ingredient-box-warning">{% trans "No items for this meal." %}- <a href="{% url wger.nutrition.views.edit_meal_item plan.id meal.id item.id %}"+ <a href="{% url 'wger.nutrition.views.edit_meal_item' plan.id meal.id item.id %}"title="{% trans 'Edit' %}"class="modal-dialog edit-meal">{% trans "Add one now."%}@@ -136,7 +137,7 @@ $(document).ready(function() {{% empty %}<div class="box warning" id="meal-box-warning">{% trans "No meals for this plan." %}- <a href="{% url meal-add plan.id %}"+ <a href="{% url 'meal-add' plan.id %}"class="modal-dialog">{% trans "Add one now." %}</a>@@ -145,7 +146,7 @@ $(document).ready(function() {{% endfor %}<tr><td colspan="2">- <a href="{% url meal-add plan.id %}"+ <a href="{% url 'meal-add' plan.id %}"class="modal-dialog"><img src="{% static 'images/icons/edit.svg' %}"width="16"@@ -163,7 +164,7 @@ $(document).ready(function() {{% if language.short_name != 'en' %}<p>{% trans "If you find the ingredient list too short, you might want to activate the preference to also show English ingredients." %}- <a href="{% url wger.manager.views.preferences %}" id="ajax-english-ingredients">{% trans "That's done here" %}</a>:+ <a href="{% url 'wger.manager.views.preferences' %}" id="ajax-english-ingredients">{% trans "That's done here" %}</a>:<img src="{% static 'images/icons/status-on.svg' %}"width="20"height="20"@@ -238,7 +239,7 @@ $(document).ready(function() {<h3>{% trans "Options" %}</h3><p>-<a href="{% url wger.nutrition.views.export_pdf plan.id %}"+<a href="{% url 'wger.nutrition.views.export_pdf' plan.id %}"target="_blank"><img src="{% static 'images/icons/save.svg' %}"width="32"@@ -250,7 +251,7 @@ $(document).ready(function() {</p><p>-<a href="{% url nutrition-edit plan.id %}"+<a href="{% url 'nutrition-edit' plan.id %}"class="modal-dialog"><img src="{% static 'images/icons/edit.svg' %}"width="32"@@ -262,7 +263,7 @@ $(document).ready(function() {<p>-<a href="{% url nutrition-copy plan.id %}">+<a href="{% url 'nutrition-copy' plan.id %}"><img src="{% static 'images/icons/copy.svg' %}"width="32"height="32"@@ -272,7 +273,7 @@ $(document).ready(function() {</p><p>-<a href="{% url nutrition-delete plan.id %}"+<a href="{% url 'nutrition-delete' plan.id %}"class="modal-dialog"><img src="{% static 'images/icons/trash.svg' %}"width="32"diff --git a/wger/software/templates/functions.html b/wger/software/templates/functions.htmlindex 965e094e4..81896d485 100644--- a/wger/software/templates/functions.html+++ b/wger/software/templates/functions.html@@ -1,4 +1,5 @@{% extends "base.html" %}+{% load url from future %}{% load i18n %}{% load staticfiles %}{% load manager_extras %}@@ -138,7 +139,7 @@ log, <a href="/static/pdf/nutrition-plan-pdf-1.0-en.pdf">here's a sample</a>.{%{% if not user.is_authenticated %}<h3>{% trans "Interested?" %}</h3><p>-<a href="{% url demo-account %}">+<a href="{% url 'demo-account' %}"><img src="{% static 'images/icons/star.svg' %}"width="48"height="48"diff --git a/wger/weight/templates/edit.html b/wger/weight/templates/edit.htmlindex cd419b632..20a9f80fc 100644--- a/wger/weight/templates/edit.html+++ b/wger/weight/templates/edit.html@@ -1,4 +1,5 @@{% extends "base.html" %}+{% load url from future %}{% load i18n %}{% load staticfiles %}{% load manager_extras %}@@ -24,7 +25,7 @@ $(document).ready(function () {<h2>{% trans "Weight entry" %}</h2>-<form action="{% url wger.weight.views.add weight.id %}"+<form action="{% url 'wger.weight.views.add' weight.id %}"method="post"class="ym-form">{% csrf_token %}diff --git a/wger/weight/templates/weight_overview.html b/wger/weight/templates/weight_overview.htmlindex b3ecb4c77..6b23cb6a7 100644--- a/wger/weight/templates/weight_overview.html+++ b/wger/weight/templates/weight_overview.html@@ -1,4 +1,5 @@{% extends "base.html" %}+{% load url from future %}{% load i18n %}{% load staticfiles %}@@ -84,7 +85,7 @@ $(document).ready(function () {<div id="weight_diagram"></div><p>-<a href="{% url weight-add %}"+<a href="{% url 'weight-add' %}"class="modal-dialog"id="add-weight-entry">{% trans "Add weight entry" %}</a></p>@@ -109,7 +110,7 @@ on the background resets it.<h3>{% trans "Options" %}</h3><p>- <a href="{% url wger.weight.views.export_csv %}"+ <a href="{% url 'wger.weight.views.export_csv' %}"target="_blank"><img src="{% static 'images/icons/save.svg' %}"width="32"@@ -121,7 +122,7 @@ on the background resets it.</p><p>- <a href="{% url weight-import-csv %}">+ <a href="{% url 'weight-import-csv' %}"><img src="{% static 'images/icons/csv-table.svg' %}"width="32"height="32"