Merge branch 'feature/nextprev' into develop
This commit is contained in:
+1
-1
@@ -20,7 +20,7 @@ class RowerInline(admin.StackedInline):
|
||||
|
||||
fieldsets = (
|
||||
('Rower Plan',
|
||||
{'fields':('rowerplan','planexpires','teamplanexpires','clubsize','protrialexpires','plantrialexpires',)}),
|
||||
{'fields':('rowerplan','paymenttype','planexpires','teamplanexpires','clubsize','protrialexpires','plantrialexpires',)}),
|
||||
('Rower Settings',
|
||||
{'fields':
|
||||
('gdproptin','gdproptindate','weightcategory','sex','birthdate','getemailnotifications',
|
||||
|
||||
@@ -704,6 +704,7 @@ class Rower(models.Model):
|
||||
choices=plans)
|
||||
paymenttype = models.CharField(
|
||||
default='single',max_length=30,
|
||||
verbose_name='Payment Type',
|
||||
choices=(
|
||||
('single','single'),
|
||||
('recurring','recurring')
|
||||
|
||||
@@ -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']
|
||||
|
||||
@@ -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>
|
||||
{% 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>
|
||||
|
||||
|
||||
@@ -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>
|
||||
{% 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">
|
||||
|
||||
@@ -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>
|
||||
{% 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>
|
||||
|
||||
@@ -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>
|
||||
{% 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">
|
||||
|
||||
@@ -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>
|
||||
{% 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">
|
||||
|
||||
@@ -165,7 +165,7 @@
|
||||
</li>
|
||||
{% if user.is_authenticated %}
|
||||
<li>
|
||||
<a href="/rowers/me/edit" title="Profile">
|
||||
<a href="/rowers/me/preferences" title="Profile">
|
||||
{% if user.rower.rowerplan == 'pro' %}
|
||||
<i class="fas fa-user-ninja "></i>
|
||||
{% elif user.rower.rowerplan == 'coach' %}
|
||||
|
||||
Reference in New Issue
Block a user