Self hosted FLOSS fitness/workout, nutrition and weight tracker
Pass user to render_weight_log
Roland Geiderf9dd73186be7
diff --git a/wger/exercises/templates/exercise/view.html b/wger/exercises/templates/exercise/view.htmlindex c78e5ad45..b3a975f64 100644--- a/wger/exercises/templates/exercise/view.html+++ b/wger/exercises/templates/exercise/view.html@@ -282,7 +282,7 @@ included in the database.{% endblocktrans %}{% if logs %}<h3>{% trans "Weight log" %}</h3>-{% render_weight_log logs svg_uuid %}+{% render_weight_log logs svg_uuid user %}<script src="{% static 'js/d3.js' %}"></script><script src="{% static 'js/jquery-globalize/lib/globalize.js' %}"></script>diff --git a/wger/manager/templates/workout/log.html b/wger/manager/templates/workout/log.htmlindex a91c66410..1ab3e55ef 100644--- a/wger/manager/templates/workout/log.html+++ b/wger/manager/templates/workout/log.html@@ -47,7 +47,7 @@ $(document).ready(function() {{% if exercise_list.log_by_date %}{% with list=exercise_list.log_by_date %}- {% render_weight_log list exercise_list.div_uuid %}+ {% render_weight_log list exercise_list.div_uuid user %}<script>$(document).ready(function() {diff --git a/wger/manager/templatetags/wger_extras.py b/wger/manager/templatetags/wger_extras.pyindex b6c78b07b..ab96782c2 100644--- a/wger/manager/templatetags/wger_extras.py+++ b/wger/manager/templatetags/wger_extras.py@@ -80,13 +80,14 @@ def pagination(paginator, page):@register.inclusion_tag('tags/render_weight_log.html')-def render_weight_log(log, div_uuid):+def render_weight_log(log, div_uuid, user=None):'''Renders a weight log series'''return {'log': log,- 'div_uuid': div_uuid}+ 'div_uuid': div_uuid,+ 'user': user}@register.inclusion_tag('tags/license-sidebar.html')