#from oauth2_provider.views import base from django.conf import settings from django.conf.urls import include, handler404, handler500 from django.urls import path, re_path from django.contrib.auth.models import User from django.contrib.auth.decorators import login_required, permission_required from django.views.decorators.csrf import csrf_exempt from django.utils.decorators import method_decorator from rowers.models import ( Workout, Rower, FavoriteChart, VirtualRaceResult, VirtualRace, StandardCollection, CourseStandard, GeoCourse, PlannedSession, ) from rest_framework import routers, serializers, viewsets, permissions from rest_framework.urlpatterns import format_suffix_patterns from rest_framework.permissions import * from rowers import views from django.contrib.auth import views as auth_views from django.views.generic.base import TemplateView, View from rowers.permissions import ( IsOwnerOrNot, IsOwnerOrReadOnly, IsCompetitorOrNot, IsRowerOrNot, IsPlanOrHigher, ) from rowers.serializers import ( WorkoutSerializer, RowerSerializer, StrokeDataSerializer, FavoriteChartSerializer, EntrySerializer, CourseStandardSerializer, StandardCollectionSerializer, VirtualRaceSerializer, GeoCourseSerializer, GeoPolygonSerializer, GeoPointSerializer, PlannedSessionSerializer, ) from rowers.forms import ForceCurveMultipleCompareForm from rowers.models import ForceCurveAnalysis from rowers.interactiveplots import forcecurve_multi_interactive_chart, instroke_multi_interactive_chart #from oauth2_provider.views import ( # AuthorizedTokensListView, # AuthorizedTokenDeleteView, #) #from oauth2_provider.views.base import ( # RevokeTokenView #) class PlannedSessionViewSet(viewsets.ModelViewSet): model = PlannedSession serializer_class = PlannedSessionSerializer def get_queryset(self): # pragma: no cover try: r = Rower.objects.get(user=self.request.user) return PlannedSession.objects.filter(rower=r).order_by("-preferreddate") except TypeError: return [] permission_classes = ( IsRowerOrNot, IsPlanOrHigher, ) class WorkoutViewSet(viewsets.ModelViewSet): model = Workout serializer_class = WorkoutSerializer def get_queryset(self): # pragma: no cover try: r = Rower.objects.get(user=self.request.user) #return Workout.objects.filter(user=r).exclude(workoutsource='strava').order_by("-date", "-starttime") return Workout.objects.filter(user=r).exclude(workoutsource='strava').order_by("-date", "-starttime") except TypeError: return [] permission_classes = ( # DjangoModelPermissions, IsOwnerOrNot, ) class RowerViewSet(viewsets.ModelViewSet): model = Rower serializer_class = RowerSerializer def get_queryset(self): # pragma: no cover try: r = Rower.objects.filter(user=self.request.user) return r except TypeError: return [] permission_classes = ( IsOwnerOrNot, ) http_method_names = ['get', 'patch', 'put'] class FavoriteChartViewSet(viewsets.ModelViewSet): model = FavoriteChart serializer_class = FavoriteChartSerializer def get_queryset(self): # pragma: no cover try: r = Rower.objects.get(user=self.request.user) return FavoriteChart.objects.filter(user=r) except TypeError: return [] permission_classes = ( IsOwnerOrNot, ) http_method_names = ['get', 'put', 'patch', 'delete'] class EntryViewSet(viewsets.ModelViewSet): model = VirtualRaceResult serializer_class = EntrySerializer def get_queryset(self): # pragma: no cover try: return VirtualRaceResult.objects.filter(userid=self.request.user.id) except TypeError: return [] http_method_names = ['get', 'post'] permission_classes = ( IsCompetitorOrNot, ) class VirtualRaceViewSet(viewsets.ModelViewSet): model = VirtualRace serializer_class = VirtualRaceSerializer def get_queryset(self): # pragma: no cover try: return VirtualRace.objects.all() except TypeError: return [] http_method_names = ['get'] class CourseStandardViewSet(viewsets.ModelViewSet): model = CourseStandard serializer_class = CourseStandardSerializer def get_queryset(self): # pragma: no cover try: return CourseStandard.objects.all() except TypeError: return [] http_method_names = ['get'] class StandardCollectionViewSet(viewsets.ModelViewSet): model = StandardCollection serializer_class = StandardCollectionSerializer def get_queryset(self): # pragma: no cover try: return StandardCollection.objects.all() except TypeError: return [] http_method_names = ['get'] class GeoCourseViewSet(viewsets.ModelViewSet): model = GeoCourse, serializer_class = GeoCourseSerializer def get_queryset(self): # pragma: no cover try: return GeoCourse.objects.all() except TypeError: return [] http_method_names = ['get', 'patch'] class StrokeDataViewSet(viewsets.ModelViewSet): serializer_class = StrokeDataSerializer # Routers provide an easy way of automatically determining the URL conf. router = routers.DefaultRouter() router.register(r'api/workouts', WorkoutViewSet, 'workout') router.register(r'api/plannedsessions', PlannedSessionViewSet, 'plannedsession') router.register(r'api/me', RowerViewSet, 'rower') router.register(r'api/charts', FavoriteChartViewSet, 'charts') router.register(r'api/entries', EntryViewSet, 'entries') router.register(r'api/challenges', VirtualRaceViewSet, 'challenges') router.register(r'api/standards', CourseStandardViewSet, 'standards') router.register(r'api/standardcollections', StandardCollectionViewSet, 'standardcollections') router.register(r'api/geocourses', GeoCourseViewSet, 'geocourses') def permissiondenied_view(request): # pragma: no cover raise PermissionDenied def filenotfound_view(request): # pragma: no cover return rowers.views.error403_view(request) def response_error_handler(request, exception=None): # pragma: no cover return HttpResponse('Error handler content', status=403) def filenotfound_handler(request, exception=None): # pragma: no cover return HttpResponse('Error handler content', status=404) handler403 = views.error403_view handler404 = views.error404_view handler400 = views.error400_view handler500 = views.error500_view urlpatterns = [ # re_path(r'^oauth2/', include('provider.oauth2.urls', namespace = 'oauth2')), # re_path(r'^o/authorize/$', base.AuthorizationView.as_view(), name="authorize"), # re_path(r'^o/token/$', base.TokenView.as_view(), name="token"), re_path('^log/$', views.javascript_log), re_path('^o/', include('oauth2_provider.urls', namespace='oauth2_provider')), re_path(r'^', include(router.urls)), re_path(r'^api-docs/$', views.schema_view, name='schema_view'), re_path(r'^api-auth/', include('rest_framework.urls', namespace='rest_framework')), re_path(r'^api/workouts/(?P\b[0-9A-Fa-f]+\b)/strokedata/$', views.strokedatajson, name='strokedatajson'), re_path(r'^api/v2/workouts/(?P\b[0-9A-Fa-f]+\b)/strokedata/$', views.strokedatajson_v2, name='strokedatajson_v2'), re_path(r'^api/v3/workouts/$', views.strokedatajson_v3, name='strokedatajson_v3'), re_path(r'^api/TCX/workouts/$', views.strokedata_tcx, name='strokedata_tcx'), re_path(r'^api/FIT/workouts/$', views.strokedata_fit, name='strokedata_fit'), re_path(r'^api/rowingdata/workouts/$', views.strokedata_rowingdata, name='strokedata_rowingdata'), re_path(r'^api/rowingdata/$', views.strokedata_rowingdata_apikey, name='strokedata_rowingdata_apikey'), re_path(r'^api/courses/$', views.course_list, name='course_list'), re_path(r'^api/courses/(?P\d+)/$', views.get_crewnerd_kml, name='get_crewnerd_kml'), re_path(r'^api/courses/kml/liked/$', views.get_crewnerd_liked, name='get_crewnerd_liked'), re_path(r'^api/courses/kml/$', views.get_crewnerd_multiple, name='get_crewnerd_multiple'), re_path(r'^500v/$', views.error500_view, name='error500_view'), re_path(r'^500q/$', views.servererror_view, name='servererror_view'), path('502/', TemplateView.as_view(template_name='502.html'), name='502'), path('500/', TemplateView.as_view(template_name='500.html'), name='500'), path('404/', TemplateView.as_view(template_name='404.html'), name='404'), path('400/', TemplateView.as_view(template_name='400.html'), name='400'), path('403/', TemplateView.as_view(template_name='403.html'), name='403'), re_path(r'^workout/(?P\b[0-9A-Fa-f]+\b)/instroke/interactive/(?P[A-Za-z_\ %20\(\)]+)/(?P[0-9]+\.?[0-9]*)/(?P[0-9]+\.?[0-9]*)/(?P[0-9]+\.?[0-9]*)/(?P[0-9]+\.?[0-9]*)/$', views.instroke_data, name='instroke_data'), re_path(r'^workout/(?P\b[0-9A-Fa-f]+\b)/instroke/interactive/$', views.instroke_chart_interactive, name='instroke_chart_interactive'), re_path(r'^workout/(?P\b[0-9A-Fa-f]+\b)/instroke/interactive/(?P\d+)/$', views.instroke_chart_interactive, name='instroke_chart_interactive'), re_path(r'^workout/(?P\b[0-9A-Fa-f]+\b)/instroke/interactive/(?P\d+)/user/(?P\d+)/$', views.instroke_chart_interactive, name='instroke_chart_interactive'), re_path(r'^exportallworkouts/?/$', views.workouts_summaries_email_view, name='workouts_summaries_email_view'), path('sessionstats/', views.sessions_stats, name='sessions_stats'), path('failedjobs/', views.failed_queue_view, name='failed_queue_view'), path('sleep/', views.sleep_view, name='sleep_view'), path('filmdeaths/', views.filmdeaths_view, name='filmdeaths_view'), path('failedjobs/empty/', views.failed_queue_empty, name='failed_queue_empty'), re_path('^failedjobs/(?P\w+.*)/$', views.failed_job_view, name='failed_job_view'), re_path(r'^update_empower/$', views.rower_update_empower_view, name='rower_update_empower_view'), re_path(r'^ajax_agegroup/(?P\d+)/(?P\w+.*)/(?P\w+.*)/(?P\d+)/$', views.ajax_agegrouprecords, name='ajax_agegrouprecords'), re_path(r'^agegrouprecords/(?P\w+.*)/(?P\w+.*)/(?P\d+)m/$', views.agegrouprecordview, name='agegrouprecordview'), re_path(r'^agegrouprecords/(?P\w+.*)/(?P\w+.*)/(?P\d+)min/$', views.agegrouprecordview, name='agegrouprecordview'), re_path(r'^agegrouprecords/(?P\w+.*)/(?P\w+.*)/$', views.agegrouprecordview, name='agegrouprecordview'), re_path(r'^agegrouprecords/$', views.agegrouprecordview, name='agegrouprecordview'), re_path(r'^workouts/actions/$', views.workouts_bulk_actions, name='workouts_bulk_actions'), re_path(r'^workouts/setrpe/$', views.workouts_setrpe_view, name='workouts_setrpe_view'), re_path(r'^workouts/setrpe/user/(?P\d+)/$', views.workouts_setrpe_view, name='workouts_setrpe_view'), re_path(r'^list-workouts/team/(?P\d+)/$', views.workouts_view, name='workouts_view'), re_path(r'^(?P\d+)/list-workouts/$', views.workouts_view, name='workouts_view'), re_path(r'^list-workouts/user/(?P\d+)/$', views.workouts_view, name='workouts_view'), re_path(r'^courses/$', views.courses_challenges_view, name='courses_challenges_view'), re_path(r'^virtualevents/$', views.virtualevents_view, name='virtualevents_view'), re_path(r'^virtualevent/createchoice/$', TemplateView.as_view( template_name='newchallengechoice.html'), name='newchallengechoice'), re_path(r'^virtualevent/create/$', views.virtualevent_create_view, name='virtualevent_create_view'), re_path(r'^virtualevent/createindoor/$', views.indoorvirtualevent_create_view, name='indoorvirtualevent_create_view'), re_path(r'^virtualevent/createfastest/$', views.fastestvirtualevent_create_view, name='fastestvirtualevent_create_view'), re_path(r'^raceregistration/togglenotification/(?P\d+)/$', views.virtualevent_toggle_email_view, name='virtualevent_toggle_email_view'), re_path(r'^indoorraceregistration/togglenotification/(?P\d+)/$', views.indoorvirtualevent_toggle_email_view, name='indoorvirtualevent_toggle_email_view'), re_path(r'^virtualevent/(?P\d+)/$', views.virtualevent_view, name='virtualevent_view'), re_path(r'^virtualevent/(?P\d+)/ranking$', views.virtualevent_ranking_view, name='virtualevent_ranking_view'), re_path(r'^virtualevent/(?P\d+)/edit/$', views.virtualevent_edit_view, name='virtualevent_edit_view'), re_path(r'^virtualevent/(?P\d+)/editindoor/$', views.indoorvirtualevent_edit_view, name='indoorvirtualevent_edit_view'), re_path(r'^virtualevent/(?P\d+)/register/$', views.virtualevent_register_view, name='virtualevent_register_view'), re_path(r'^virtualevent/(?P\d+)/registerindoor/$', views.indoorvirtualevent_register_view, name='indoorvirtualevent_register_view'), re_path(r'^virtualevent/(?P\d+)/register/edit/(?P\d+)/$', views.virtualevent_entry_edit_view, name='virtualevent_entry_edit_view'), re_path(r'^virtualevent/(?P\d+)/adddiscipline/$', views.virtualevent_addboat_view, name='virtualevent_addboat_view'), re_path(r'^virtualevent/(?P\d+)/withdraw/(?P\d+)/$', views.virtualevent_withdraw_view, name='virtualevent_withdraw_view'), re_path(r'^virtualevent/(?P\d+)/withdraw/$', views.virtualevent_withdraw_view, name='virtualevent_withdraw_view'), re_path(r'^virtualevent/(?P\b[0-9A-Fa-f]+\b)/submit/$', views.virtualevent_submit_result_view, name='virtualevent_submit_result_view'), re_path(r'^virtualevent/(?P\d+)/submit/(?P\b[0-9A-Fa-f]+\b)/$', views.virtualevent_submit_result_view, name='virtualevent_submit_result_view'), re_path(r'^virtualevent/(?P\d+)/disqualify/(?P\d+)/', views.virtualevent_disqualify_view, name='virtualevent_disqualify_view'), re_path(r'^virtualevent/(?P\d+)/withdrawresult/(?P\d+)/', views.virtualevent_withdrawresult_view, name='virtualevent_withdrawresult_view'), re_path(r'^virtualevent/(?P\d+)/download/', views.virtualevent_results_download_view, name='virtualevent_results_download_view'), re_path(r'^list-workouts/$', views.workouts_view, name='workouts_view'), re_path(r'^list-courses/$', views.courses_view, name='courses_view'), re_path(r'^list-standards/$', views.standards_view, name='standards_view'), re_path(r'^courses/upload/$', views.course_upload_view, name='course_upload_view'), re_path(r'^courses/(?P\d+)/update/(?P\d+)/', views.course_update_confirm, name='course_update_confirm'), re_path(r'^courses/(?P\d+)/update/', views.course_upload_replace_view, name='course_upload_replace_view'), re_path(r'^courses/(?P\d+)/follow/', views.course_follow_view, name='course_follow_view'), re_path(r'^courses/(?P\d+)/unfollow/', views.course_unfollow_view, name='course_unfollow_view'), re_path(r'^courses/(?P\d+)/workout/(?P\b[0-9A-Fa-f]+\b)', views.course_view, name='course_view'), re_path(r'^standards/upload/$', views.standards_upload_view, name='standards_upload_view'), re_path(r'^standards/upload/(?P\d+)/$', views.standards_upload_view, name='standards_upload_view'), re_path(r'^workout/addmanual/(?P\d+)/$', views.addmanual_view, name='addmanual_view'), re_path(r'^workout/addmanual/$', views.addmanual_view, name='addmanual_view'), re_path(r'^workouts-join/$', views.workouts_join_view, name='workouts_join_view'), re_path(r'^workouts-join/user/(?P\d+)$', views.workouts_join_view, name='workouts_join_view'), re_path(r'^workouts-join-select/$', views.workouts_join_select, name='workouts_join_select'), re_path(r'^workouts-join-select/user/(?P\d+)/$', views.workouts_join_select, name='workouts_join_select'), re_path( r'^user-analysis-select/(?P\w.*)/team/(?P\d+)/workout/(?P\b[0-9A-Fa-f]+\b)/$', views.analysis_new, name='analysis_new'), re_path(r'workout/(?P\b[0-9A-Fa-f]+\b)/submit/(?P\d+)/$', views.workout_submit_course_view, name='workout_submit_course_view'), re_path(r'^workouts-dupes-select/user/(?P\d+)/$', views.workouts_duplicates_select_view, name='workouts_duplicates_select_view'), re_path(r'^workouts-dupes-select/$', views.workouts_duplicates_select_view, name='workouts_duplicates_select_view'), re_path( r'^user-analysis-select/(?P\w.*)/session/(?P\d+)/workout/(?P\b[0-9A-Fa-f]+\b)/$', views.analysis_new, name='analysis_new'), re_path( r'^user-analysis-select/(?P\w.*)/workout/(?P\b[0-9A-Fa-f]+\b)/$', views.analysis_new, name='analysis_new'), re_path(r'^user-analysis-select/(?P\w.*)/user/(?P\d+)/$', views.analysis_new, name='analysis_new'), re_path(r'^user-analysis-select/(?P\w.*)/team/(?P\d+)/$', views.analysis_new, name='analysis_new'), re_path( r'^user-analysis-select/team/(?P\d+)/workout/(?P\b[0-9A-Fa-f]+\b)/$', views.analysis_new, name='analysis_new'), re_path(r'^user-analysis-select/user/(?P\d+)/$', views.analysis_new, name='analysis_new'), re_path(r'^user-analysis-select/team/(?P\d+)/$', views.analysis_new, name='analysis_new'), re_path(r'^user-analysis-select/(?P\w.*)/$', views.analysis_new, name='analysis_new'), re_path(r'^user-analysis-select/$', views.analysis_new, name='analysis_new'), re_path(r'^list-jobs/$', views.session_jobs_view, name='session_jobs_view'), re_path(r'^jobs-status/$', views.session_jobs_status, name='session_jobs_status'), re_path(r'^job-kill/(?P.*)/$', views.kill_async_job), re_path(r'^record-progress/(?P\d+)/(?P.*)/$', views.post_progress, name='post_progress'), re_path(r'^record-progress/(?P.*)/$', views.post_progress), re_path(r'^record-progress/$', views.post_progress), re_path(r'^list-graphs/$', views.graphs_view, name='graphs_view'), re_path(r'^list-graphs/user/(?P\d+)/$', views.graphs_view, name='graphs_view'), re_path(r'^createmarkerworkouts/user/(?P\d+)/$', views.create_marker_workouts_view, name='create_marker_workouts_view'), re_path(r'^createmarkerworkouts/$', views.create_marker_workouts_view, name='create_marker_workouts_view'), re_path(r'^goldmedalscores/$', views.goldmedalscores_view, name='goldmedalscores_view'), re_path(r'^goldmedalscores/user/(?P\d+)/$', views.goldmedalscores_view, name='goldmedalscores_view'), re_path(r'^goldmedalscores/user/(?P\d+)/(?P\w+.*)/$', views.goldmedalscores_view, name='goldmedalscores_view'), re_path(r'^performancemanager/$', views.performancemanager_view, name='performancemanager_view'), re_path(r'^performancemanager/user/(?P\d+)/$', views.performancemanager_view, name='performancemanager_view'), re_path(r'^performancemanager/user/(?P\d+)/(?P\w+.*)/$', views.performancemanager_view, name='performancemanager_view'), re_path(r'^trainingzones/$', views.trainingzones_view, name='trainingzones_view'), re_path(r'^trainingzones/user/(?P\d+)/$', views.trainingzones_view, name='trainingzones_view'), re_path(r'^trainingzones/user/(?P\d+)/data/$', views.trainingzones_view_data, name="trainingzones_view_data"), re_path(r'^trainingzones/data/$', views.trainingzones_view_data, name="trainingzones_view_data"), re_path(r'^analysisdata/user/(?P\d+)/$', views.analysis_view_data, name='analysis_view_data'), re_path(r'^analysisdata/$', views.analysis_view_data, name='analysis_view_data'), re_path(r'^graph/(?P\d+)/$', views.graph_show_view, name='graph_show_view'), re_path(r'^graph/(?P\d+)/delete/$', views.GraphDelete.as_view(), name='graph_delete'), re_path(r'^workout/(?P\b[0-9A-Fa-f]+\b)/get-thumbnails/$', views.get_thumbnails, name='get_thumbnails'), re_path(r'^workout/(?P\b[0-9A-Fa-f]+\b)/otwuseimpeller/$', views.otw_use_impeller, name='otw_use_impeller'), re_path(r'^workout/(?P\b[0-9A-Fa-f]+\b)/otwusegps/$', views.otw_use_gps, name='otw_use_gps'), re_path(r'^workout/(?P\b[0-9A-Fa-f]+\b)/toggle-ranking/$', views.workout_toggle_ranking, name='workout_toggle_ranking'), re_path(r'^workout/upload/team/$', views.team_workout_upload_view, name='team_workout_upload_view'), re_path(r'^workout/upload/team/user/(?P\d+)/$', views.team_workout_upload_view, name='team_workout_upload_view'), re_path(r'^workout/upload/(?P\d+)/$', views.workout_upload_view, name='workout_upload_view'), re_path(r'^workout/upload/$', views.workout_upload_view, name='workout_upload_view'), re_path(r'^workout/(?P\b[0-9A-Fa-f]+\b)/forcecurve/$', views.workout_forcecurve_view, name='workout_forcecurve_view'), re_path(r'^workout/(?P\b[0-9A-Fa-f]+\b)/forcecurve/(?P\d+)/$', views.workout_forcecurve_view, name='workout_forcecurve_view'), re_path(r'^workout/(?P\b[0-9A-Fa-f]+\b)/forcecurve/(?P\d+)/user/(?P\d+)/$', views.workout_forcecurve_view, name='workout_forcecurve_view'), re_path(r'^workout/(?P\b[0-9A-Fa-f]+\b)/unsubscribe/$', views.workout_unsubscribe_view, name='workout_unsubscribe_view'), re_path(r'^workout/(?P\b[0-9A-Fa-f]+\b)/comment/$', views.workout_comment_view, name='workout_comment_view'), re_path(r'^workout/(?P\b[0-9A-Fa-f]+\b)/emailtcx/$', views.workout_tcxemail_view, name='workout_tcxemail_view'), re_path(r'^workout/(?P\b[0-9A-Fa-f]+\b)/emailgpx/$', views.workout_gpxemail_view, name='workout_gpxemail_view'), re_path(r'^workout/(?P\b[0-9A-Fa-f]+\b)/emailcsv/$', views.workout_csvemail_view, name='workout_csvemail_view'), re_path(r'^workout/(?P\b[0-9A-Fa-f]+\b)/csvtoadmin/$', views.workout_csvtoadmin_view, name='workout_csvtoadmin_view'), re_path(r'^workout/(?P\b[0-9A-Fa-f]+\b)/edit/$', views.workout_edit_view, name='workout_edit_view'), re_path(r'^workout/(?P\b[0-9A-Fa-f]+\b)/map/$', views.workout_map_view, name='workout_map_view'), re_path(r'^workout/(?P\b[0-9A-Fa-f]+\b)/instroke/(?P\w+.*)/$', views.instroke_chart, name='instroke_chart'), re_path(r'^workout/(?P\b[0-9A-Fa-f]+\b)/instroke/$', views.instroke_view, name='instroke_view'), re_path(r'^workout/(?P\b[0-9A-Fa-f]+\b)/stats/$', views.workout_stats_view, name='workout_stats_view'), re_path(r'^workout/(?P\b[0-9A-Fa-f]+\b)/data/$', views.workout_data_view, name='workout_data_view'), re_path(r'^workout/(?P\b[0-9A-Fa-f]+\b)/resample/$', views.workout_resample_view, name='workout_resample_view'), re_path(r'^workout/(?P\b[0-9A-Fa-f]+\b)/(?P\w+)/erase/$', views.workout_erase_column_view, name='workout_erase_column_view'), re_path(r'^workout/(?P\b[0-9A-Fa-f]+\b)/zeropower-confirm/$', views.remove_power_confirm_view, name='remove_power_confirm_view'), re_path(r'^workout/(?P\b[0-9A-Fa-f]+\b)/image/$', views.workout_uploadimage_view, name='workout_uploadimage_view'), re_path(r'^virtualevent/(?P\d+)/compare/$', views.virtualevent_compare_view, name='virtualevent_compare_view'), re_path(r'^courses/(?P\d+)/compare/$', views.course_compare_view, name='course_compare_view'), re_path(r'^virtualevent/(?P\d+)/mapcompare/$', views.virtualevent_mapcompare_view, name='virtualevent_mapcompare_view'), re_path(r'^courses/(?P\d+)/mapcompare/$', views.course_mapcompare_view, name='course_mapcompare_view'), re_path(r'^virtualevent/(?P\d+)/image/$', views.virtualevent_uploadimage_view, name='virtualevent_uploadimage_view'), re_path(r'^virtualevent/(?P\d+)/setimage/(?P\d+)/$', views.virtualevent_setlogo_view, name='virtualevent_setlog_view'), re_path(r'^virtualevent/(?P\d+)/follow/$', views.addfollower_view, name='addfollower_view'), re_path(r'^logo/(?P\d+)/delete/$', views.logo_delete_view, name='logo_delete_view'), re_path(r'^workout/(?P\b[0-9A-Fa-f]+\b)/darkskywind/$', views.workout_downloadwind_view, name='workout_downloadwind_view'), re_path(r'^workout/(?P\b[0-9A-Fa-f]+\b)/metar/(?P\w+)/$', views.workout_downloadmetar_view, name='workout_downloadmetar_view'), re_path(r'^workout/(?P\b[0-9A-Fa-f]+\b)/editintervals/$', views.workout_summary_edit_view, name='workout_summary_edit_view'), re_path(r'^workout/(?P\b[0-9A-Fa-f]+\b)/split_intervals/$', views.workout_split_by_interval_view, name='workout_split_by_interval_view'), re_path(r'^workout/(?P\b[0-9A-Fa-f]+\b)/restore/$', views.workout_summary_restore_view, name='workout_summary_restore_view'), re_path(r'^workout/(?P\b[0-9A-Fa-f]+\b)/split/$', views.workout_split_view, name='workout_split_view'), re_path(r'^workout/(?P\b[0-9A-Fa-f]+\b)/view/entry/(?P\d+)/$', views.workout_view, name='workout_view'), re_path(r'^workout/(?P\b[0-9A-Fa-f]+\b)/view/entry/(?P\d+)/nocourse/$', views.workout_view, name='workout_view'), re_path(r'^workout/(?P\b[0-9A-Fa-f]+\b)/view/session/(?P\d+)/$', views.workout_view, name='workout_view'), re_path(r'^workout/(?P\b[0-9A-Fa-f]+\b)/view/$', views.workout_view, name='workout_view'), re_path(r'^workout/(?P\b[0-9A-Fa-f]+\b)/video/$', views.workout_video_create_view, name='workout_video_create_view'), re_path(r'^video/(?P\d+)/delete/$', views.VideoDelete.as_view(), name='video_delete'), re_path(r'^video/(?P\w.+)/m/$', views.workout_video_view_mini, name='workout_video_view_mini'), re_path(r'^video/(?P\w.+)/$', views.workout_video_view, name='workout_video_view'), re_path(r'^videos/$', views.list_videos, name='list_videos'), re_path(r'^videos/user/(?P\d+)/$', views.list_videos, name='list_videos'), re_path(r'^add-video/user/(?P\d+)/$', views.video_selectworkout, name='video_selectworkout'), re_path(r'^add-video/', views.video_selectworkout, name='video_selectworkout'), # re_path(r'^workout/(?P\d+)/$',views.workout_view,name='workout_view'), re_path(r'^workout/(?P\b[0-9A-Fa-f]+\b)/$', views.workout_view, name='workout_view'), re_path(r'^workout/fusion/(?P\b[0-9A-Fa-f]+\b)/(?P\b[0-9A-Fa-f]+\b)/$', views.workout_fusion_view, name='workout_fusion_view'), re_path(r'^workout/fusion/(?P\b[0-9A-Fa-f]+\b)/$', views.workout_fusion_list, name='workout_fusion_list'), # re_path(r'^workout/fusion/(?P\b[0-9A-Fa-f]+\b)/(?P\d+-\d+-\d+)/(?P\d+-\d+-\d+)/$',views.workout_fusion_list,name='workout_fusion_list'), re_path(r'^help/$', TemplateView.as_view( template_name='help.html'), name='help' ), re_path(r'^physics/$', TemplateView.as_view(template_name='physics.html'), name='physics'), re_path(r'^partners/$', TemplateView.as_view(template_name='partners.html'), name='partners'), # keeping the old URLs for retrofit re_path(r'^workout/(?P\b[0-9A-Fa-f]+\b)/addtimeplot/$', views.workout_add_chart_view, {'plotnr': '1'}, name='workout_add_chart_view'), re_path(r'^workout/(?P\b[0-9A-Fa-f]+\b)/adddistanceplot/$', views.workout_add_chart_view, {'plotnr': '2'}, name='workout_add_chart_view'), re_path(r'^workout/(?P\b[0-9A-Fa-f]+\b)/addpiechart/$', views.workout_add_chart_view, {'plotnr': '3'}, name='workout_add_chart_view'), re_path(r'^workout/(?P\b[0-9A-Fa-f]+\b)/adddistanceplot2/$', views.workout_add_chart_view, {'plotnr': '7'}, name='workout_add_chart_view'), re_path(r'^workout/(?P\b[0-9A-Fa-f]+\b)/addtimeplot2/$', views.workout_add_chart_view, {'plotnr': '8'}, name='workout_add_chart_view'), re_path(r'^workout/(?P\b[0-9A-Fa-f]+\b)/addotwpowerplot/$', views.workout_add_chart_view, {'plotnr': '9'}, name='workout_add_chart_view'), re_path(r'^workout/(?P\b[0-9A-Fa-f]+\b)/addpowerpiechart/$', views.workout_add_chart_view, {'plotnr': '13'}, name='workout_add_chart_view'), re_path(r'^workout/(?P\b[0-9A-Fa-f]+\b)/addstatic/(?P\d+)/$', views.workout_add_chart_view, name='workout_add_chart_view'), re_path(r'^workout/(?P\b[0-9A-Fa-f]+\b)/addstatic/$', views.workout_add_chart_view, name='workout_add_chart_view'), re_path(r'^workout/(?P\b[0-9A-Fa-f]+\b)/delete/$', login_required( views.WorkoutDelete.as_view()), name='workout_delete'), re_path(r'^workout/(?P\b[0-9A-Fa-f]+\b)/delete/$', login_required( views.WorkoutDelete.as_view()), name='workout_delete'), re_path(r'^strava/webhooks/', views.strava_webhook_view, name='strava_webhook_view'), # re_path(r'^garmin/summaries/', views.garmin_summaries_view, # name='garmin_summaries_view'), # re_path(r'^garmin/files/', views.garmin_newfiles_ping, # name='garmin_newfiles_ping'), # re_path(r'^garmin/activities/', views.garmin_details_view, # name='garmin_details_view'), # re_path(r'^garmin/deregistration/', views.garmin_deregistration_view, # name='garmin_deregistration_view'), re_path(r'^workout/(?P\b[0-9A-Fa-f]+\b)/smoothenpace/$', views.workout_smoothenpace_view, name='workout_smoothenpace_view'), re_path(r'^workout/(?P\b[0-9A-Fa-f]+\b)/undosmoothenpace/$', views.workout_undo_smoothenpace_view, name='workout_undo_smoothenpace_view'), re_path(r'^session/rojaboimport/$', views.workout_rojaboimport_view, name='workout_rojaboimport_view'), re_path(r'^session/intervalsimport/$', views.plannedsession_intervalsimport_view, name='plannedsession_intervalsimport_view'), re_path(r'^session/intervals/webhook/$', views.intervals_webhook_view, name='intervals_webhook_view'), re_path(r'^workout/(?P\w+.*)import/$', views.workout_import_view, name='workout_import_view'), re_path(r'^workout/(?P\w+.*)import/(?P\d+)/$', views.workout_getimportview, name='workout_getimportview'), re_path(r'^workout/(?P[0-9A-Fa-f]+)/(?P[0-9A-za-z]+)uploadw/$', views.workout_export_view, name='workout_export_view'), re_path(r'^workout/(?P\b[0-9A-Fa-f]+\b)/recalcsummary/$', views.workout_recalcsummary_view, name='workout_recalcsummary_view'), re_path(r'^alerts/user/(?P\d+)/$', views.alerts_view, name='alerts_view'), re_path(r'^alerts/$', views.alerts_view, name='alerts_view'), re_path(r'^alerts/(?P\d+)/delete/$', views.AlertDelete.as_view(), name='alert_delete_view'), re_path(r'^alerts/(?P\d+)/edit/user/(?P\d+)/$', views.alert_edit_view, name='alert_edit_view'), re_path(r'^alerts/(?P\d+)/edit/$', views.alert_edit_view, name='alert_edit_view'), re_path(r'^alerts/new/user/(?P\d+)/$', views.alert_create_view, name='alert_create_view'), re_path(r'^alerts/new/$', views.alert_create_view, name='alert_create_view'), re_path(r'^alerts/(?P\d+)/report/user/(?P\d+)/$', views.alert_report_view, name='alert_report_view'), re_path(r'^alerts/(?P\d+)/report/(?P\d+)/user/(?P\d+)/$', views.alert_report_view, name='alert_report_view'), re_path(r'^alerts/(?P\d+)/report/$', views.alert_report_view, name='alert_report_view'), re_path(r'^me/deactivate/$', views.deactivate_user, name='deactivate_user'), re_path(r'^me/messages/$', views.user_messages, name='user_messages'), re_path(r'^me/messages/$', views.user_messages, name='user_messages'), re_path(r'^me/messages/delete/$', views.user_messages_delete_all, name='user_messages_delete_all'), re_path(r'^me/messages/(?P\d+)/markread/$', views.user_message_markread, name='user_message_markread'), re_path(r'^me/messages/(?P\d+)/delete/$', views.user_message_delete, name='user_message_delete'), re_path(r'^me/messages/user/(?P\d+)/$', views.user_messages, name='user_messages'), re_path(r'^me/delete/$', views.remove_user, name='remove_user'), re_path(r'^survey/$', views.survey, name='survey'), re_path(r'^me/gdpr-optin-confirm/?/$', views.user_gdpr_confirm, name='user_gdpr_confirm'), re_path(r'^me/gdpr-optin-confirm/$', views.user_gdpr_confirm, name='user_gdpr_confirm'), re_path(r'^me/gdpr-optin/?/$', views.user_gdpr_optin, name='user_gdpr_optin'), re_path(r'^me/gdpr-optin/$', views.user_gdpr_optin, name='user_gdpr_optin'), re_path(r'^me/teams/$', views.rower_teams_view, name='rower_teams_view'), re_path(r'^me/calcdps/$', views.rower_calcdps_view, name='rower_calcdps_view'), re_path(r'^me/exportsettings/$', views.rower_exportsettings_view, name='rower_exportsettings_view'), re_path(r'^me/exportsettings/user/(?P\d+)/$', views.rower_exportsettings_view, name='rower_exportsettings_view'), re_path(r'^team/(?P\d+)/$', views.team_view, name='team_view'), re_path(r'^team/(?P\d+)/memberstats/$', views.team_members_stats_view, name='team_members_stats_view'), re_path(r'^team/(?P\d+)/edit/$', views.team_edit_view, name='team_edit_view'), re_path(r'^team/(?P\d+)/leaveconfirm/$', views.team_leaveconfirm_view, name='team_leaveconfirm_view'), re_path(r'^team/(?P\d+)/leave/$', views.team_leave_view, name='team_leave_view'), re_path(r'^team/(?P\d+)/deleteconfirm/$', views.team_deleteconfirm_view, name='team_deleteconfirm_view'), re_path(r'^team/(?P\d+)/requestmembership/(?P\d+)/$', views.team_requestmembership_view, name='team_requestmembership_view'), re_path(r'^me/coachrequest/(?P\d+)/reject/$', views.reject_revoke_coach_request, name='reject_revoke_coach_request'), re_path(r'^coaches/(?P\d+)/dropconfirm/$', views.coach_drop_athlete_confirm_view, name='coach_drop_athlete_confirm_view'), re_path(r'^coaches/(?P\d+)/drop/$', views.coach_drop_athlete_view, name='coach_drop_athlete_view'), re_path(r'^coaches/(?P\d+)/dropcoachconfirm/$', views.athlete_drop_coach_confirm_view, name='athlete_drop_coach_confirm_view'), re_path(r'^coaches/(?P\d+)/dropcoach/$', views.athlete_drop_coach_view, name='athlete_drop_coach_view'), re_path(r'^me/coachrequest/(?P\d+)/revoke/$', views.reject_revoke_coach_request, name='reject_revoke_coach_request'), re_path(r'^me/coachoffer/(?P\d+)/reject/$', views.reject_revoke_coach_offer, name='reject_revoke_coach_offer'), re_path(r'^me/coachoffer/(?P\d+)/revoke/$', views.reject_revoke_coach_offer, name='reject_revoke_coach_offer'), re_path(r'^me/coachrequest/(?P\d+)/$', views.request_coaching_view, name='request_coaching_view'), re_path(r'^me/coachoffer/(?P\d+)/$', views.offer_coaching_view, name='offer_coaching_view'), re_path(r'^me/coachrequest/(?P\w+.*)/accept/$', views.coach_accept_coachrequest_view, name='coach_accept_coachrequest_view'), re_path(r'^me/coachoffer/(?P\w+.*)/accept/$', views.rower_accept_coachoffer_view, name='rower_accept_coachoffer_view'), re_path(r'^team/(?P\d+)/delete/$', views.team_delete_view, name='team_delete_view'), re_path(r'^team/create/$', views.team_create_view, name='team_create_view'), re_path(r'^me/team/(?P\d+)/drop/(?P\d+)/$', views.manager_member_drop_view, name='manager_member_drop_view'), re_path(r'^me/invitation/(?P\d+)/reject/$', views.invitation_reject_view, name='invitation_reject_view'), re_path(r'^me/invitation/(?P\d+)/revoke/$', views.invitation_revoke_view, name='invitation_revoke_view'), re_path(r'^me/invitation/$', views.rower_invitations_view, name='rower_invitations_view'), re_path(r'^me/raise500/$', views.raise_500, name='raise_500'), re_path(r'^me/invitation/(\w+.*)/$', views.rower_invitations_view, name='rower_invitations_view'), re_path(r'^me/request/(?P\d+)/revoke/$', views.request_revoke_view, name='request_revoke_view'), re_path(r'^me/request/(?P\d+)/reject/$', views.request_reject_view, name='request_reject_view'), re_path(r'^me/request/(\w+.*)/$', views.manager_requests_view, name='manager_requests_view'), re_path(r'^me/request/$', views.manager_requests_view, name='manager_requests_view'), re_path(r'^me/edit/$', views.rower_edit_view, name='rower_edit_view'), re_path(r'^me/regenerateapikey/$', views.rower_regenerate_apikey, name='rower_regenerate_apikey'), re_path(r'^me/edit/user/(?P\d+)/$', views.rower_edit_view, name='rower_edit_view'), re_path(r'^me/preferences/$', views.rower_prefs_view, name='rower_prefs_view'), re_path(r'^me/prefs/$', views.rower_simpleprefs_view, name='rower_simpleprefs_view'), re_path(r'^me/transactions/$', views.transactions_view, name='transactions_view'), re_path(r'^me/preferences/user/(?P\d+)/$', views.rower_prefs_view, name='rower_prefs_view'), re_path(r'^me/prefs/user/(?P\d+)/$', views.rower_simpleprefs_view, name='rower_simpleprefs_view'), re_path(r'^me/idokladauthorize/$', views.rower_idoklad_authorize, name='rower_idoklad_authorize'), re_path(r'^me/rojaboauthorize/$', views.rower_rojabo_authorize, name='rower_rojabo_authorize'), re_path(r'^me/polarauthorize/$', views.rower_polar_authorize, name='rower_polar_authorize'), re_path(r'^me/revokeapp/(?P\d+)/$', views.rower_revokeapp_view, name='rower_revokeapp_view'), re_path(r'^me/garminauthorize/$', views.rower_garmin_authorize, name='rower_garmin_authorize'), re_path(r'^me/edit/(.+.*)/$', views.rower_edit_view, name='rower_edit_view'), re_path(r'^me/(?P\w+.*)authorize', views.rower_integration_authorize, name='rower_integration_authorize'), re_path(r'^me/(?P\w+.*)refresh/$', views.rower_integration_token_refresh, name='rower_integration_token_refresh'), re_path(r'^me/favoritecharts/$', views.rower_favoritecharts_view, name='rower_favoritecharts_view'), re_path(r'^me/favoritecharts/user/(?P\d+)/$', views.rower_favoritecharts_view, name='rower_favoritecharts_view'), # re_path(r'^me/workflowconfig/$',views.workout_workflow_config_view), re_path(r'^me/workflowconfig2/$', views.workout_workflow_config2_view, name='workout_workflow_config2_view'), re_path(r'^me/workflowconfig2/user/(?P\d+)/$', views.workout_workflow_config2_view, name='workout_workflow_config2_view'), re_path(r'^me/workflowdefault/$', views.workflow_default_view, name='workflow_default_view'), re_path(r'^email/send/$', views.sendmail, name='sendmail'), re_path(r'^email/thankyou/$', TemplateView.as_view(template_name='thankyou.html'), name='thankyou'), re_path(r'^email/$', views.sendmail, name='sendmail'), # TemplateView.as_view(template_name='email.html'), name='email'), re_path(r'^about', TemplateView.as_view( template_name='about_us.html'), name='about'), re_path(r'^brochure/$', TemplateView.as_view(template_name='brochure.html'), name='brochure'), re_path(r'^developers', TemplateView.as_view( template_name='developers.html'), name='about'), re_path(r'^analysis/user/(?P\d+)/$', views.analysis_view, name='analysis'), re_path(r'^laboratory/$', views.laboratory_view, name='laboratory_view'), re_path(r'^laboratory/user/(?P\d+)/$', views.laboratory_view, name='laboratory_view'), re_path(r'^errormessage/(?P[\w\ ]+.*)/$', views.errormessage_view, name='errormessage_view'), re_path(r'^analysis/$', views.analysis_view, name='analysis'), re_path(r'^analysis/instrokeanalysis/$', views.SavedAnalysisView.as_view( chart = instroke_multi_interactive_chart, ), name='instrokeanalysis_view'), re_path(r'^analysis/forcecurveanalysis/$', views.SavedAnalysisView.as_view( template_name='forcecurve_analysis.html', form_class = ForceCurveMultipleCompareForm, analysis_class = ForceCurveAnalysis, chart = forcecurve_multi_interactive_chart, name = 'Force Curve Analysis', url = '/rowers/analysis/forcecurveanalysis/' ), name='forcecurveanalysis_view'), re_path(r'^analysis/instrokeanalysis/(?P\d+)/delete/$', views.InStrokeAnalysisDelete.as_view(), name='instroke_analysis_delete_view'), re_path(r'^analysis/forcecurveanalysis/(?P\d+)/delete/$', views.ForceCurveAnalysisDelete.as_view(), name='forcecurve_analysis_delete_view'), re_path(r'^checkout/(?P\d+)/$', views.payment_confirm_view, name='payment_confirm_view'), re_path(r'^upgradecheckout/(?P\d+)/$', views.upgrade_confirm_view, name='upgrade_confirm_view'), re_path(r'^upgradecheckout/(?P\d+)/$', views.upgrade_confirm_view, name='upgrade_confirm_view'), re_path(r'^downgradecheckout/(?P\d+)/$', views.downgrade_confirm_view, name='downgrade_confirm_view'), re_path(r'^billing/$', views.billing_view, name='billing'), re_path(r'^upgrade/$', views.upgrade_view, name='upgrade'), re_path(r'^downgrade/$', views.downgrade_view, name='downgrade'), re_path(r'^paymentcompleted/$', views.payment_completed_view, name='payment_completed_view'), re_path(r'^downgradecompleted/$', views.downgrade_completed_view, name='downgrade_completed_view'), re_path(r'^me/cancelsubscriptions/$', views.plan_stop_view, name='plan_stop_view'), re_path(r'^me/cancelsubscription/(?P[\w\ ]+.*)/$', views.plan_tobasic_view, name='plan_tobasic_view'), re_path(r'^checkouts/$', views.checkouts_view, name='checkouts'), re_path(r'^upgradecheckouts/$', views.upgrade_checkouts_view, name='upgrade_checkouts'), re_path(r'^downgradecheckouts/$', views.downgrade_checkouts_view, name='downgrade_checkouts'), re_path(r'^purchasecheckouts/$', views.purchase_checkouts_view, name='purchase_checkouts_view'), re_path(r'^starttrial/$', views.start_trial_view, name='start_trial_view'), re_path(r'^legal', TemplateView.as_view( template_name='legal.html'), name='legal'), path('activate///', views.useractivate, name='useractivate'), re_path(r'^register/thankyou/$', TemplateView.as_view( template_name='registerthankyou.html'), name='registerthankyou'), re_path(r'^workout/(?P\b[0-9A-Fa-f]+\b)/workflow/$', views.workout_workflow_view, name='workout_workflow_view'), re_path(r'^workout/(?P\b[0-9A-Fa-f]+\b)/courses/$', views.workout_course_view, name='workout_course_view'), re_path(r'^workout/(?P\b[0-9A-Fa-f]+\b)/flexchart/'\ '(?P[\w\ ]+.*)/(?P[\w\ ]+.*)/(?P[\w\ ]+.*)/(?P\w+)/$', views.workout_flexchart3_view, name='workout_flexchart3_view'), re_path(r'^workout/(?P\b[0-9A-Fa-f]+\b)/flexchart/'\ '(?P\w+.*)/(?P[\w\ ]+.*)/(?P[\w\ ]+.*)/(?P\w+.*)/$', views.workout_flexchart3_view, name='workout_flexchart3_view'), re_path( r'^workout/(?P\b[0-9A-Fa-f]+\b)/flexchart/'\ '(?P\w+.*)/(?P[\w\ ]+.*)/(?P[\w\ ]+.*)/$', views.workout_flexchart3_view, name='workout_flexchart3_view'), re_path(r'^workout/(?P\b[0-9A-Fa-f]+\b)/flexchart/$', views.workout_flexchart3_view, name='workout_flexchart3_view'), re_path(r'^workout/(?P\b[0-9A-Fa-f]+\b)/flexchartstacked/$', views.workout_flexchart_stacked_view, name='workout_flexchart_stacked_view'), re_path(r'^test\_callback', views.rower_process_testcallback, name='rower_process_testcallback'), re_path(r'^createplan/$', views.rower_create_trainingplan, name='rower_create_trainingplan'), re_path(r'^createplan/user/(?P\d+)/$', views.rower_create_trainingplan, name='rower_create_trainingplan'), re_path(r'^plans/$', views.rower_select_instantplan, name='rower_select_instantplan'), re_path(r'^plans/step/(?P\d+)/edit/$', views.stepedit, name='stepedit'), re_path(r'^plans/step/(?P\d+)/edit/(?P\d+)/$', views.stepedit, name='stepedit'), re_path(r'^plans/step/(?P\d+)/delete/$', views.stepdelete, name='stepdelete'), re_path(r'^plans/stepeditor/$', views.stepeditor, name='stepeditor'), re_path(r'^plans/stepeditor/(?P\d+)/$', views.stepeditor, name='stepeditor'), re_path(r'^plans/stepadder/(?P\d+)/$', views.stepadder, name='stepadder'), re_path(r'^plans/(?P[0-9a-fA-F]{8}\-[0-9a-fA-F]{4}\-[0-9a-fA-F]{4}\-[0-9a-fA-F]{4}\-[0-9a-fA-F]{12})/$', views.rower_view_instantplan, name='rower_view_instantplan'), re_path(r'^buyplan/(?P\d+)/$', views.buy_trainingplan_view, name='buy_trainingplan_view'), re_path(r'^confirmpurchaseplan/(?P\d+)/$', views.confirm_trainingplan_purchase_view, name='confirm_trainingplan_purchase_view'), re_path(r'^addinstantplan/$', views.add_instantplan_view, name='add_instantplan_view'), re_path(r'^deleteplan/(?P\d+)/$', login_required( views.TrainingPlanDelete.as_view()), name='trainingplan_delete_view'), re_path(r'^deletemicrocycle/(?P\d+)/$', login_required( views.MicroCycleDelete.as_view()), name='microcycle_delete_view'), re_path(r'^deletemesocycle/(?P\d+)/$', login_required( views.MesoCycleDelete.as_view()), name='mesocycle_delete_view'), re_path(r'^deletemacrocycle/(?P\d+)/$', login_required( views.MacroCycleDelete.as_view()), name='macrocycle_delete_view'), # re_path(r'^deleteplan/(?P\d+)/$',views.rower_delete_trainingplan), re_path(r'^plan/(?P\d+)/$', views.rower_trainingplan_view, name='rower_trainingplan_view'), re_path(r'^plan/(?P\d+)/user/(?P\d+)/$', views.rower_trainingplan_view, name='rower_trainingplan_view'), re_path(r'^plan/(?P\d+)/micro/(?P\d+)/$', views.rower_trainingplan_view, name='rower_trainingplan_view'), re_path(r'^plan/(?P\d+)/micro/(?P\d+)/user/(?P\d+)/$', views.rower_trainingplan_view, name='rower_trainingplan_view'), re_path(r'^plan/(?P\d+)/meso/(?P\d+)/$', views.rower_trainingplan_view, name='rower_trainingplan_view'), re_path(r'^plan/(?P\d+)/meso/(?P\d+)/user/(?P\d+)/$', views.rower_trainingplan_view, name='rower_trainingplan_view'), re_path(r'^plan/(?P\d+)/macro/(?P\d+)/$', views.rower_trainingplan_view, name='rower_trainingplan_view'), re_path(r'^plan/(?P\d+)/macro/(?P\d+)/user/(?P\d+)/$', views.rower_trainingplan_view, name='rower_trainingplan_view'), re_path(r'^plan/(?P\d+)/execution/$', views.rower_trainingplan_execution_view, name='rower_trainingplan_execution_view'), re_path(r'^plan/(?P\d+)/execution/user/(?P\d+)/$', views.rower_trainingplan_execution_view, name='rower_trainingplan_execution_view'), re_path(r'^macrocycle/(?P\d+)/$', login_required( views.TrainingMacroCycleUpdate.as_view()), name='macrocycle_update_view'), re_path(r'^mesocycle/(?P\d+)/$', login_required( views.TrainingMesoCycleUpdate.as_view()), name='mesocycle_update_view'), re_path(r'^macrocycle/(?P\d+)/planbymonths/$', login_required( views.planmacrocyclebymonth)), re_path(r'^macrocycle/(?P\d+)/planbymonths/user/(?P\d+)/$', views.planmacrocyclebymonth), re_path(r'^mesocycle/(?P\d+)/planbyweeks/$', views.planmesocyclebyweek), re_path(r'^mesocycle/(?P\d+)/planbyweeks/user/(?P\d+)/$', views.planmesocyclebyweek), re_path(r'^microcycle/(?P\d+)/$', login_required( views.TrainingMicroCycleUpdate.as_view()), name='microcycle_update_view'), re_path(r'^deletetarget/(?P\d+)/$', views.rower_delete_trainingtarget, name='rower_delete_trainingtarget'), re_path(r'^editplan/(?P\d+)/$', login_required( views.TrainingPlanUpdate.as_view()), name='trainingplan_update_view'), re_path(r'^edittarget/(?P\d+)/$', login_required( views.TrainingTargetUpdate.as_view()), name='trainingtarget_update_view'), re_path(r'^workout/(?P\b[0-9A-Fa-f]+\b)/test\_strokedata/$', views.strokedataform, name='strokedataform'), re_path(r'^workout/(?P\b[0-9A-Fa-f]+\b)/v2/test\_strokedata/$', views.strokedataform_v2, name='strokedataform_v2'), re_path(r'^sessions/library/$', views.template_library_view, name="template_library_view"), re_path(r'^sessions/teamcreate/user/(?P\d+)/$', views.plannedsession_teamcreate_view, name='plannedsession_teamcreate_view'), re_path(r'^sessions/teamcreate/team/(?P\d+)/user/(?P\d+)/$', views.plannedsession_teamcreate_view, name='plannedsession_teamcreate_view'), re_path(r'^sessions/teamcreate/$', views.plannedsession_teamcreate_view, name='plannedsession_teamcreate_view'), re_path(r'^sessions/teamcreate/team/$', views.plannedsession_teamcreate_view, name='plannedsession_teamcreate_view'), re_path(r'^sessions/teamedit/(?P\d+)/$', views.plannedsession_teamedit_view, name='plannedsession_teamedit_view'), re_path(r'^sessions/(?P\d+)/share/$', views.template_share_view, name='template_share_view'), re_path(r'^sessions/(?P\d+)/makeprivate/$', views.template_makeprivate_view, name='template_makeprivate_view'), re_path(r'^sessions/(?P\d+)/removeme/$', views.remove_groupsession_view, name='remove_groupsession_view'), re_path(r'^sessions/teamedit/(?P\d+)/user/(?P\d+)/$', views.plannedsession_teamedit_view, name='plannedsession_teamedit_view'), re_path(r'^sessions/create/$', views.plannedsession_create_view, name='plannedsession_create_view'), re_path(r'^sessions/createtemplate/$', views.plannedsession_createtemplate_view, name='plannedsession_createtemplate_view'), re_path(r'^sessions/create/user/(?P\d+)/$', views.plannedsession_create_view, name='plannedsession_create_view'), re_path(r'^sessions/multiclone/$', views.plannedsession_multiclone_view, name='plannedsession_multiclone_view'), re_path(r'^sessions/multiclone/user/(?P\d+)/$', views.plannedsession_multiclone_view, name='plannedsession_multiclone_view'), re_path(r'^sessions/multicreate/$', views.plannedsession_multicreate_view, name='plannedsession_multicreate_view'), re_path(r'^sessions/multicreate/user/(?P\d+)/extra/(?P\d+)/$', views.plannedsession_multicreate_view, name='plannedsession_multicreate_view'), re_path(r'^sessions/multicreate/user/(?P\d+)/$', views.plannedsession_multicreate_view, name='plannedsession_multicreate_view'), re_path(r'^sessions/(?P\d+)/edit/$', views.plannedsession_edit_view, name='plannedsession_edit_view'), re_path(r'^sessions/(?P\d+)/templateedit/', views.plannedsession_templateedit_view, name='plannedsession_templateedit_view'), re_path(r'^sessions/(?P\d+)/maketemplate/$', views.plannedsession_totemplate_view, name='plannedsession_totemplate_view'), re_path(r'^sessions/(?P\d+)/togarmin/$', views.plannedsession_togarmin_view, name='plannedsession_togarmin_view'), re_path(r'^sessions/(?P\d+)/tointervals/$', views.plannedsession_tointervals_view, name='plannedsession_tointervals_view'), re_path(r'^sessions/(?P\d+)/compare/$', views.plannedsession_compare_view, name='plannedsession_compare_view'), re_path(r'^sessions/(?P\d+)/compare/user/(?P\d+)/$', views.plannedsession_compare_view, name='plannedsession_compare_view'), re_path(r'^sessions/(?P\d+)/edit/user/(?P\d+)/$', views.plannedsession_edit_view, name='plannedsession_edit_view'), re_path(r'^sessions/(?P\d+)/clone/user/(?P\d+)/$', views.plannedsession_clone_view, name='plannedsession_clone_view'), re_path(r'^sessions/(?P\d+)/clone/team/$', views.plannedsession_teamclone_view, name='plannedsession_teamclone_view'), re_path(r'^sessions/(?P\d+)/clone/$', views.plannedsession_clone_view), re_path( r'^sessions/(?P\d+)/detach/(?P\b[0-9A-Fa-f]+\b)/user/(?P\d+)/$', views.plannedsession_detach_view), re_path( r'^sessions/(?P\d+)/detach/(?P\b[0-9A-Fa-f]+\b)/$', views.plannedsession_detach_view), re_path(r'^sessions/(?P\d+)/$', views.plannedsession_view, name='plannedsession_view'), re_path(r'^sessions/(?P\d+)/user/(?P\d+)/$', views.plannedsession_view, name='plannedsession_view'), re_path(r'^sessions/(?P\d+)/deleteconfirm/$', login_required( views.PlannedSessionDelete.as_view())), re_path(r'^sessions/(?P\d+)/delete/$', login_required( views.PlannedSessionDelete.as_view()), name='plannedsession_delete_view'), re_path(r'^sessions/manage/session/(?P\d+)/$', views.plannedsessions_manage_view, name='plannedsessions_manage_view'), re_path(r'^sessions/manage/session/(?P\d+)/user/(?P\d+)/$', views.plannedsessions_manage_view, name='plannedsessions_manage_view'), re_path(r'^sessions/manage/?/$', views.plannedsessions_manage_view, name='plannedsessions_manage_view'), re_path(r'^sessions/manage/user/(?P\d+)/$', views.plannedsessions_manage_view, name='plannedsessions_manage_view'), re_path(r'^sessions/coach/$', views.plannedsessions_coach_view, name='plannedsessions_coach_view'), re_path(r'^sessions/coach/user/(?P\d+)/$', views.plannedsessions_coach_view, name='plannedsessions_coach_view'), re_path(r'^sessions/coach/sendcalendar/user/(?P\d+)/$', views.plannedsessions_coach_icsemail_view, name='plannedsessions_coach_icsemail_view'), re_path(r'^sessions/print/?/$', views.plannedsessions_print_view, name='plannedsessions_print_view'), re_path(r'^sessions/(?P\d+)/comments/user/(?P\d+)/$', views.plannedsession_comment_view, name='plannedsession_comment_view'), re_path(r'^sessions/(?P\d+)/comments/$', views.plannedsession_comment_view, name='plannedsession_comment_view'), re_path(r'^sessions/print/user/(?P\d+)/$', views.plannedsessions_print_view, name='plannedsessions_print_view'), re_path(r'^sessions/(?P\d+)/message/$', views.plannedsession_message_view, name='plannedsession_message_view'), re_path(r'^sessions/print/user/(?P\d+)/(?P\d+-\d+-\d+)/(?P\d+-\d+-\d+)/$', views.plannedsessions_print_view, name='plannedsessions_print_view'), re_path(r'^sessions/sendcalendar/$', views.plannedsessions_icsemail_view, name='plannedsessions_coach_icsemail_view'), re_path(r'^sessions/sendcalendar/user/(?P\d+)/$', views.plannedsessions_icsemail_view, name='plannedsessions_icsemail_view'), re_path(r'^sessions/saveasplan/$', views.save_plan_yaml, name='save_plan_yaml'), re_path(r'^sessions/saveasplan/user/(?P\d+)/$', views.save_plan_yaml, name='save_plan_yaml'), re_path(r'^sessions/$', views.plannedsessions_view, name='plannedsessions_view'), re_path(r'^sessions/user/(?P\d+)/$', views.plannedsessions_view, name='plannedsessions_view'), re_path(r'^courses/(?P\d+)/edit/$', views.course_edit_view, name='course_edit_view'), re_path(r'^courses/(?P\d+)/delete/$', views.course_delete_view, name='course_delete_view'), re_path(r'^courses/(?P\d+)/downloadkml/$', views.course_kmldownload_view, name='course_kmldownload_view'), re_path(r'^courses/(?P\d+)/$', views.course_view, name='course_view'), re_path(r'^standards/(?P\d+)/$', views.standard_view, name='standard_view'), re_path(r'^standards/(?P\d+)/download/$', views.standards_download_view, name='standards_download_view'), re_path(r'^standards/(?P\d+)/deactivate/$', views.standard_deactivate_view, name='standard_deactivate_view'), re_path(r'^courses/(?P\d+)/map/$', views.course_map_view, name='course_map_view'), re_path(r'^help/$', TemplateView.as_view(template_name='help.html'), name='help'), re_path(r'^workout/api/upload/', views.workout_upload_api, name='workout_upload_api'), re_path(r'^access/share/$', views.createShareURL, name="sharedURL"), re_path(r'^access/(?P\w+)/$', views.sharedPage, name="sharedPage"), re_path(r'^history/user/(?P\d+)/$', views.history_view, name="history_view"), re_path(r'^history/$', views.history_view, name="history_view"), re_path(r'^history/user/(?P\d+)/data/$', views.history_view_data, name="history_view_data"), re_path(r'^history/data/$', views.history_view_data, name="history_view_data"), re_path(r'^braintree/$', views.braintree_webhook_view, name="braintree_webhook_view"), re_path(r'^nextweekplan/$', views.nextweekplan_view, name='nextweekplan_view'), re_path(r'^currentweekplan/$', views.currentweekplan_view, name='currentweekplan_view'), re_path(r'^deepwaterlogin/$', views.deepwatertoken_login, name='deepwatertoken_login'), re_path(r'^deepwatertoken/$', views.get_deepwater_token, name='get_deepwater_token'), ]