From ab33759bd298a9efed2d12fd42ed654c25f959ed Mon Sep 17 00:00:00 2001
From: Sander Roosendaal Import and Export Settings for {{ rower.user.first_name }} {{ rower.user.last_name }}
+
- You are connected to Garmin. Switching off Garmin Connect sync is on the - Account settings - page. Look for the "Rowsandall" app. -
-{% endif %} -- Garmin Connnect has no manual sync, so connecting your account to your Garmin account will - automatically auto-sync workouts from Garmin to Rowsandall (but not in the other direction). If you - want to export our structured workout sessions to your Garmin device, you have to set the "Garmin Activity" - to a activity type that is supported by your watch. Not all watches support "Custom" activities, so - you may have to set your activity to Run or Ride while rowing. -
-- Strava Auto Import also imports activity changes on Strava to Rowsandall, except when you delete - a workout on Strava. If you want Deletions to propagate to Rowsandall, tick the Strava Auto Delete - check box. -
++ Click on the icons to establish the connection or to renew the authorization. +
-{{ apikey }}
++ Regenerate +
+This API key can be used to access the Rowsandall API. It is used by some third party applications to access your data. Keep it secret.
++ Please correct the error{{ form.errors|pluralize }} below. +
++ Garmin Connnect has no manual sync, so connecting your account to your Garmin account will + automatically auto-sync workouts from Garmin to Rowsandall (but not in the other direction). If you + want to export our structured workout sessions to your Garmin device, you have to set the "Garmin Activity" + to a activity type that is supported by your watch. Not all watches support "Custom" activities, so + you may have to set your activity to Run or Ride while rowing. +
+ {% if rower.garmintoken and rower.garmintoken != '' %} ++ You are connected to Garmin. Switching off Garmin Connect sync is on the + Account settings + page. Look for the "Rowsandall" app. +
+ {% endif %} ++ Strava Auto Import also imports activity changes on Strava to Rowsandall, except when you delete + a workout on Strava. If you want Deletions to propagate to Rowsandall, tick the Strava Auto Delete + check box. +
+ ++ These applications have access to your Rowsandall data. +
{{ apikey }}
-- Regenerate -
- This API key can be used to access the Rowsandall API. It is used by some third party applications to access your data. Keep it secret. -Click on one of the icons below to connect to the service of your - choice or to renew the authorization.
- - - - - - - - - - - + + {% endblock %} diff --git a/rowers/views/statements.py b/rowers/views/statements.py index 01771ce6..09ac2fa1 100644 --- a/rowers/views/statements.py +++ b/rowers/views/statements.py @@ -179,7 +179,13 @@ from rowers.models import ( RowerPowerForm, RowerHRZonesForm, SimpleRowerPowerFo IndoorVirtualRaceForm, PlannedSessionCommentForm, Alert, Condition, StaticChartRowerForm, FollowerForm, VirtualRaceAthleteForm, InstantPlanForm, DataRowerForm, - StepEditorForm, iDokladToken ) + StepEditorForm, iDokladToken, + RowerExportFormStrava, RowerExportFormPolar, + RowerExportFormSportTracks, RowerExportFormTrainingPeaks, + RowerExportFormConcept2, RowerExportFormGarmin, + RowerExportFormIntervals, RowerExportFormRP3, + RowerExportFormNK, + ) from rowers.models import ( FavoriteForm, BaseFavoriteFormSet, SiteAnnouncement, BasePlannedSessionFormSet, get_course_timezone, BaseConditionFormSet, diff --git a/rowers/views/userviews.py b/rowers/views/userviews.py index ddd4fe73..d2d22e25 100644 --- a/rowers/views/userviews.py +++ b/rowers/views/userviews.py @@ -457,19 +457,42 @@ def rower_exportsettings_view(request, userid=0): 'polar_auto_import': 'polartoken', 'c2_auto_export': 'c2token', 'c2_auto_import': 'c2token', - 'runkeeper_auto_export': 'runkeepertoken', 'sporttracks_auto_export': 'sporttrackstoken', 'strava_auto_export': 'stravatoken', 'strava_auto_import': 'stravatoken', 'strava_auto_delete': 'stravatoken', 'trainingpeaks_auto_export': 'tptoken', 'rp3_auto_import': 'rp3token', - 'nk_auto_import': 'nktoken' + 'nk_auto_import': 'nktoken', + 'intervals_auto_export': 'intervals_token', } r = getrequestrowercoachee(request, userid=userid) + + forms = { + 'polar': RowerExportFormPolar(instance=r), + 'c2': RowerExportFormConcept2(instance=r), + 'sporttracks': RowerExportFormSportTracks(instance=r), + 'strava': RowerExportFormStrava(instance=r), + 'trainingpeaks': RowerExportFormTrainingPeaks(instance=r), + 'rp3': RowerExportFormRP3(instance=r), + 'intervals': RowerExportFormIntervals(instance=r), + 'nk': RowerExportFormNK(instance=r), + 'garmin': RowerExportFormGarmin(instance=r), + } if request.method == 'POST': form = RowerExportForm(request.POST) + forms = { + 'polar': RowerExportFormPolar(request.POST, instance=r), + 'c2': RowerExportFormConcept2(request.POST, instance=r), + 'sporttracks': RowerExportFormSportTracks(request.POST, instance=r), + 'strava': RowerExportFormStrava(request.POST, instance=r), + 'trainingpeaks': RowerExportFormTrainingPeaks(request.POST, instance=r), + 'rp3': RowerExportFormRP3(request.POST, instance=r), + 'intervals': RowerExportFormIntervals(request.POST, instance=r), + 'nk': RowerExportFormNK(request.POST, instance=r), + 'garmin': RowerExportFormGarmin(request.POST, instance=r), + } if form.is_valid(): cd = form.cleaned_data if r.rowerplan == 'basic': # pragma: no cover @@ -528,6 +551,7 @@ def rower_exportsettings_view(request, userid=0): return render(request, 'rower_exportsettings.html', {'form': form, + 'forms': forms, 'rower': r, 'breadcrumbs': breadcrumbs, 'grants': grants,