Private
Public Access
1
0

added export as ride

This commit is contained in:
Sander Roosendaal
2017-08-31 16:24:05 +02:00
parent 75f50f4de2
commit 71c0a6f5ff
7 changed files with 119 additions and 4 deletions

View File

@@ -157,6 +157,38 @@ class Rower(models.Model):
('hwt','heavy-weight'),
('lwt','light-weight'),
)
stravatypes = (
('Ride','Ride'),
('Kitesurf','Kitesurf'),
('Run','Run'),
('NordicSki','NordicSki'),
('Swim','Swim'),
('RockClimbing','RockClimbing'),
('Hike','Hike'),
('RollerSki','RollerSki'),
('Walk','Walk'),
('Rowing','Rowing'),
('AlpineSki','AlpineSki'),
('Snowboard','Snowboard'),
('BackcountrySki','BackcountrySki'),
('Snowshoe','Snowshoe'),
('Canoeing','Canoeing'),
('StairStepper','StairStepper'),
('Crossfit','Crossfit'),
('StandUpPaddling','StandUpPaddling'),
('EBikeRide','EBikeRide'),
('Surfing','Surfing'),
('Elliptical','Elliptical'),
('VirtualRide','VirtualRide'),
('IceSkate','IceSkate'),
('WeightTraining','WeightTraining'),
('InlineSkate','InlineSkate'),
('Windsurf','Windsurf'),
('Kayaking','Kayaking'),
('Workout','Workout'),
('Yoga','Yoga'),
)
user = models.OneToOneField(User)
# Heart Rate Zone data
@@ -215,6 +247,10 @@ class Rower(models.Model):
blank=True,null=True)
stravatoken = models.CharField(default='',max_length=200,blank=True,null=True)
stravaexportas = models.CharField(default="Rowing",
max_length=30,
choices=stravatypes,
verbose_name="Export Workouts to Strava as")
runkeepertoken = models.CharField(default='',max_length=200,
blank=True,null=True)
@@ -558,6 +594,11 @@ class AdvancedWorkoutForm(ModelForm):
model = Workout
fields = ['boattype','weightvalue']
class RowerExportForm(ModelForm):
class Meta:
model = Rower
fields = ['stravaexportas']
# Simple form to set rower's Functional Threshold Power
class RowerPowerForm(ModelForm):
class Meta: