Private
Public Access
1
0

runkeeper functionality complete (not fully tested)

This commit is contained in:
Sander Roosendaal
2017-03-23 20:07:10 +01:00
parent d89219a2df
commit 08c0838d85
4 changed files with 375 additions and 40 deletions

View File

@@ -33,6 +33,15 @@ from rowers.models import Rower,Workout
from rowsandall_app.settings import C2_CLIENT_ID, C2_REDIRECT_URI, C2_CLIENT_SECRET, STRAVA_CLIENT_ID, STRAVA_REDIRECT_URI, STRAVA_CLIENT_SECRET, SPORTTRACKS_CLIENT_SECRET, SPORTTRACKS_CLIENT_ID, SPORTTRACKS_REDIRECT_URI
# Custom error class - to raise a NoTokenError
class SportTracksNoTokenError(Exception):
def __init__(self,value):
self.value=value
def __str__(self):
return repr(self.value)
# Custom exception handler, returns a 401 HTTP message
# with exception details in the json data
def custom_exception_handler(exc,message):