Private
Public Access
1
0

recognize C2 Logbook summary

This commit is contained in:
Sander Roosendaal
2016-12-20 15:31:10 +01:00
parent 18ccda0924
commit 660bc2ebf3
4 changed files with 30 additions and 5 deletions

View File

@@ -3733,6 +3733,13 @@ def workout_upload_view(request,message=""):
f2 = z.extract(z.namelist()[0],path='media/')
fileformat = fileformat[2]
os.remove(f_to_be_deleted)
if fileformat == 'c2log':
message = "This C2 logbook summary does not contain stroke data. Please download the Export Stroke Data file from the workout details on the C2 logbook."
url = reverse(workout_upload_view,
args=[str(message)])
response = HttpResponseRedirect(url)
return response
if fileformat == 'unknown':
message = "We couldn't recognize the file type"