Private
Public Access
1
0

trying to get it to run on manjaro linux

This commit is contained in:
Sander Roosendaal
2019-02-03 15:33:05 +01:00
parent 7c8ea1969a
commit 2bc0aa72fb
3 changed files with 30 additions and 28 deletions

View File

@@ -65,14 +65,14 @@ from rowers.dataprepnodjango import (
add_c2_stroke_data_db,totaltime_sec_to_string,
create_c2_stroke_data_db,update_empower,
database_url_debug,database_url,dataprep,
# create_strava_stroke_data_db
# create_strava_stroke_data_db
)
from django.core.mail import (
send_mail,
EmailMessage,EmailMultiAlternatives,
)
)
from django.template import Context
from django.db.utils import OperationalError
@@ -106,7 +106,7 @@ def handle_c2_import_stroke_data(c2token,
c2id,workoutid,
starttimeunix,
csvfilename,debug=True,**kwargs):
if 'workouttype' in kwargs:
workouttype = kwargs['workouttype']
else:
@@ -124,12 +124,13 @@ def handle_c2_import_stroke_data(c2token,
strokedata,workoutid,starttimeunix,
csvfilename,debug=debug,workouttype=workouttype
)
return 1
else:
url = "https://log.concept2.com/api/users/me/results/"+str(c2id)
s = requests.get(url,headers=headers)
if s.status_code == 200:
workoutdata = s.json()['data']
distance = workoutdata['distance']