diff --git a/rowers/admin.py b/rowers/admin.py index f28aecae..8b2c0d74 100644 --- a/rowers/admin.py +++ b/rowers/admin.py @@ -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', diff --git a/rowers/models.py b/rowers/models.py index 85b7a2fd..3a711c35 100644 --- a/rowers/models.py +++ b/rowers/models.py @@ -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') diff --git a/rowers/polarstuff.py b/rowers/polarstuff.py index e6fe6025..83c1b6d1 100644 --- a/rowers/polarstuff.py +++ b/rowers/polarstuff.py @@ -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'] diff --git a/rowers/templates/flexchart3otw.html b/rowers/templates/flexchart3otw.html index ff4cfa16..e675ca2d 100644 --- a/rowers/templates/flexchart3otw.html +++ b/rowers/templates/flexchart3otw.html @@ -19,6 +19,17 @@ {{ the_script |safe }} +
+ {% if workout|previousworkout:rower.user %} + Previous + {% endif %} + {% if workout|nextworkout:rower.user %} + Next + {% endif %} +
++ {% if workout|previousworkout:rower.user %} + Previous + {% endif %} + {% if workout|nextworkout:rower.user %} + Next + {% endif %} +
++ {% if workout|previousworkout:rower.user %} + Previous + {% endif %} + {% if workout|nextworkout:rower.user %} + Next + {% endif %} +
++ {% if workout|previousworkout:rower.user %} + Previous + {% endif %} + {% if workout|nextworkout:rower.user %} + Next + {% endif %} +
++ {% if workout|previousworkout:rower.user %} + Previous + {% endif %} + {% if workout|nextworkout:rower.user %} + Next + {% endif %} +
+