diff --git a/logos/bcsquare.png b/logos/bcsquare.png
new file mode 100644
index 00000000..547f4488
Binary files /dev/null and b/logos/bcsquare.png differ
diff --git a/logos/boatcoachlogo.png b/logos/boatcoachlogo.png
new file mode 100644
index 00000000..057ad75f
Binary files /dev/null and b/logos/boatcoachlogo.png differ
diff --git a/logos/boatcoachlogo.xcf b/logos/boatcoachlogo.xcf
new file mode 100644
index 00000000..52f41b8a
Binary files /dev/null and b/logos/boatcoachlogo.xcf differ
diff --git a/rowers/templates/compatibility.html b/rowers/templates/compatibility.html
index 0d47a17b..6dc792cb 100644
--- a/rowers/templates/compatibility.html
+++ b/rowers/templates/compatibility.html
@@ -16,13 +16,14 @@
CrewNerd (TCX)
Rowing In Motion (TCX)
Speedcoach XL (CSV)
- Speedcoach GPS (FIT)
+ Speedcoach GPS (FIT and CSV)
Erg
- Painsled (CSV)
- ErgData (CSV export from Concept2 logbook)
- RowPro (CSV)
+- BoatCoach (CSV)
- ErgStick (CSV)
@@ -35,7 +36,7 @@
Export Compatibility
- Concept2 Logbook: Exports stroke by stroke data for erg and OTW rowing
-- Strava:
+- Strava
- SportTracks
- email (TCX or CSV format)
diff --git a/rowers/templates/frontpage.html b/rowers/templates/frontpage.html
index 61e08861..1532f44d 100644
--- a/rowers/templates/frontpage.html
+++ b/rowers/templates/frontpage.html
@@ -22,8 +22,9 @@
+
-{% endblock %}
\ No newline at end of file
+{% endblock %}
diff --git a/rowers/views.py b/rowers/views.py
index b565971a..1d1a64c2 100644
--- a/rowers/views.py
+++ b/rowers/views.py
@@ -342,17 +342,6 @@ def add_workout_from_strokedata(user,importid,data,strokedata,source='c2'):
rowdatetime = iso8601.parse_date(data['start_date'])
except ParseError:
rowdatetime = iso8601.parse_date(data['date'])
-# try:
- # rowdatetime = datetime.datetime.strptime(data['date_utc'],"%Y-%m-%d %H:%M:%S")
- # rowdatetime = thetimezone.localize(rowdatetime).astimezone(utc)
-# except KeyError:
-# try:
-# rowdatetime = dateutil.parser.parse(data['start_date'])
-# rowdatetime = thetimezone.localize(rowdatetime).astimezone(utc)
-# except:
-# rowdatetime = datetime.datetime.strptime(data['date'],"%Y-%m-%d %H:%M:%S")
-# rowdatetime = thetimezone.localize(rowdatetime).astimezone(utc)
-
try:
@@ -2337,6 +2326,9 @@ def workout_wind_view(request,id=0,message="",successmessage=""):
except KeyError:
hascoordinates = 0
+ if not latitude.std():
+ hascoordinates = 0
+
try:
bearing = rowdata.df.ix[:,'bearing'].values
except KeyError:
@@ -3149,10 +3141,14 @@ def workout_edit_view(request,id=0,message="",successmessage=""):
if rowdata != 0:
try:
latitude = rowdata.df[' latitude']
+ if not latitude.std():
+ hascoordinates = 0
except KeyError,AttributeError:
hascoordinates = 0
+
else:
hascoordinates = 0
+
if hascoordinates:
res = googlemap_chart(rowdata.df[' latitude'],
@@ -3691,36 +3687,39 @@ def workout_getc2workout_view(request,c2id):
res = c2stuff.get_c2_workout(request.user,c2id)
if (res.status_code == 200):
data = res.json()['data']
- if 'stroke_data' in data:
- # test = data['stroke_data']
+ if data['stroke_data']:
res2 = c2stuff.get_c2_workout_strokes(request.user,c2id)
- # 2016-07-27 added below if statement (balkanboy error report)
- if res2.status_code == 200:
- strokedata = pd.DataFrame.from_dict(res2.json()['data'])
- id = add_workout_from_strokedata(request.user,c2id,data,strokedata,
+ else:
+ message = "This workout does not have any stroke data associated with it"
+ url = reverse(workout_c2import_view,
+ kwargs={
+ 'message':message,
+ })
+ return HttpResponseRedirect(url)
+
+ if res2.status_code == 200:
+ strokedata = pd.DataFrame.from_dict(res2.json()['data'])
+ id = add_workout_from_strokedata(request.user,c2id,data,strokedata,
source='c2')
- w = Workout.objects.get(id=id)
- w.uploadedtoc2=c2id
- w.save()
- url = "/rowers/workout/"+str(id)+"/edit"
- return HttpResponseRedirect(url)
- else:
- message = json.loads(s.text)['message']
- url = reverse(workout_c2import_view,
- kwargs={
- 'message':message,
- })
- return HttpResponseRedirect(url)
+ w = Workout.objects.get(id=id)
+ w.uploadedtoc2=c2id
+ w.save()
+ url = "/rowers/workout/"+str(id)+"/edit"
+ return HttpResponseRedirect(url)
else:
- message = "This workout doesn't contain stroke data"
- if settings.DEBUG:
- return HttpResponse(res)
- else:
- url = reverse(workout_c2import_view,
- kwargs={
- 'message':message,
- })
- return HttpResponseRedirect(url)
+ # message = json.loads(s.text)['message']
+ message = json.loads(res2.text)['message']
+ url = reverse(workout_c2import_view,
+ kwargs={
+ 'message':message,
+ })
+ return HttpResponseRedirect(url)
+
+ url = reverse(workout_c2import_view,
+ kwargs={
+ 'message':message,
+ })
+ return HttpResponseRedirect(url)
else:
message = "Received error code from Concept2"
diff --git a/static/img/bcsquare.png b/static/img/bcsquare.png
new file mode 100644
index 00000000..163cef9b
Binary files /dev/null and b/static/img/bcsquare.png differ