Private
Public Access
1
0

adding previous and next to new workout pages

This commit is contained in:
Sander Roosendaal
2018-11-27 14:03:04 +01:00
parent 9f82c270e9
commit 2f17ca12ec
6 changed files with 56 additions and 1 deletions

View File

@@ -299,7 +299,7 @@ def get_polar_workout(user,id,transactionid):
if response.status_code == 200:
exerciseurls = response.json()['exercises']
for exerciseurl in exerciseurls:
response = requests.gedt(exerciseurl,headers=headers)
response = requests.get(exerciseurl,headers=headers)
if response.status_code == 200:
exercise_dict = response.json()
thisid = exercise_dict['id']

View File

@@ -19,6 +19,17 @@
{{ the_script |safe }}
<p>
{% if workout|previousworkout:rower.user %}
<a href="/rowers/workout/{{ workout|previousworkout:rower.user }}/flexchart"
title="Jump to preceding workout"><em>Previous</em></a>&nbsp;
{% endif %}
{% if workout|nextworkout:rower.user %}
<a href="/rowers/workout/{{ workout|nextworkout:rower.user }}/flexchart"
title="Jump to following workout"><em>Next</em></a>
{% endif %}
</p>
<h1>Flexible Chart</h1>

View File

@@ -6,6 +6,17 @@
{% block title %}Change Workout {% endblock %}
{% block main %}
<p>
{% if workout|previousworkout:rower.user %}
<a href="/rowers/workout/{{ workout|previousworkout:rower.user }}/editintervals"
title="Jump to preceding workout"><em>Previous</em></a>&nbsp;
{% endif %}
{% if workout|nextworkout:rower.user %}
<a href="/rowers/workout/{{ workout|nextworkout:rower.user }}/editintervals"
title="Jump to following workout"><em>Next</em></a>
{% endif %}
</p>
<h1>Edit Workout Interval Data</h1>
<ul class="main-content">
<li class="grid_2">

View File

@@ -60,6 +60,17 @@
{% block main %}
<p>
{% if workout|previousworkout:rower.user %}
<a href="/rowers/workout/{{ workout|previousworkout:rower.user }}/workflow"
title="Jump to preceding workout"><em>Previous</em></a>&nbsp;
{% endif %}
{% if workout|nextworkout:rower.user %}
<a href="/rowers/workout/{{ workout|nextworkout:rower.user }}/workflow"
title="Jump to following workout"><em>Next</em></a>
{% endif %}
</p>
<h1>{{ workout.name }}</h1>
{% if workout.user.user != user %}
<h2>{{ workout.user.user.first_name }} {{ workout.user.user.last_name }}</h2>

View File

@@ -10,6 +10,17 @@
{% block title %}Comment Workout {% endblock %}
{% block main %}
<p>
{% if workout|previousworkout:rower.user %}
<a href="/rowers/workout/{{ workout|previousworkout:rower.user }}/comment"
title="Jump to preceding workout"><em>Previous</em></a>&nbsp;
{% endif %}
{% if workout|nextworkout:rower.user %}
<a href="/rowers/workout/{{ workout|nextworkout:rower.user }}/comment"
title="Jump to following workout"><em>Next</em></a>
{% endif %}
</p>
<h1>Comments {{ workout.name }}</h1>
<ul class="main-content">

View File

@@ -5,6 +5,17 @@
{% block title %}Workout Statistics{% endblock %}
{% block main %}
<p>
{% if workout|previousworkout:rower.user %}
<a href="/rowers/workout/{{ workout|previousworkout:rower.user }}/stats"
title="Jump to preceding workout"><em>Previous</em></a>&nbsp;
{% endif %}
{% if workout|nextworkout:rower.user %}
<a href="/rowers/workout/{{ workout|nextworkout:rower.user }}/stats"
title="Jump to following workout"><em>Next</em></a>
{% endif %}
</p>
<h1>Workout Statistics for {{ workout.name }}</h1>
<ul class="main-content">
<li class="grid_4">