Skip to content

armgit / wger

Public Imported from GitHub
0

Self hosted FLOSS fitness/workout, nutrition and weight tracker

Merge branch 'master' into metrics-graphics

Roland Geider0488dbd6d594
diff --cc wger/core/templates/template.html
index 0ad1fa723,cee7ffb66..0ac8f031f
--- a/wger/core/templates/template.html
+++ b/wger/core/templates/template.html
@@@ -58,14 -58,14 +58,13 @@@
<link rel="icon" href="{% static 'images/favicon.png' %}" type="image/png">
{% compress js %}
- <script src="{% static 'js/jquery.js' %}"></script>
+ <script src="{% static 'bower_components/jquery/dist/jquery.js' %}"></script>
<script src="{% static 'js/jquery-ui.js' %}"></script>
- <script src="{% static 'js/d3.js' %}"></script>
+ <script src="{% static 'bower_components/d3/d3.js' %}"></script>
<script src="{% static 'js/workout-manager.js' %}"></script>
<script src="{% static 'js/ubuntu-unity.js' %}"></script>
- <script src="{% static 'js/bootstrap.min.js' %}"></script>
- <script src="{% static 'js/bootstrap-datepicker/bootstrap-datepicker.min.js' %}"></script>
+ <script src="{% static 'bower_components/bootstrap/dist/js/bootstrap.min.js' %}"></script>
<script src="{% static 'js/exercises.js' %}"></script>
- <script src="{% static 'js/weight.js' %}"></script>
<script src="{% static 'js/nutrition.js' %}"></script>
{% endcompress %}
diff --cc wger/weight/views.py
index 3b9e786fb,357025c4d..163e2c54e
--- a/wger/weight/views.py
+++ b/wger/weight/views.py
@@@ -143,7 -174,8 +174,8 @@@ def overview(request, username=None)
template_data['is_owner'] = is_owner
template_data['owner_user'] = user
template_data['show_shariff'] = is_owner
+ template_data['last_five_weight_entries_details'] = last_five_weight_entries_details
- return render(request, 'weight_overview.html', template_data)
+ return render(request, 'overview.html', template_data)
@api_view(['GET'])
@@@ -166,9 -198,12 +198,8 @@@ def get_weight_data(request, username=N
chart_data = []
for i in weights:
- chart_data.append({'date': i.creation_date,
- 'weight': i.weight,
- chart_data.append({'x': "%(month)s/%(day)s/%(year)s" % {
- 'year': i.date.year,
- 'month': i.date.month,
- 'day': i.date.day},
- 'y': i.weight,
-- 'id': i.id})
++ chart_data.append({'date': i.date,
++ 'weight': i.weight})
# Return the results to the client
return Response(chart_data)