reads excel template workout summary
This commit is contained in:
@@ -32,7 +32,7 @@ from rowingdata import (
|
|||||||
MysteryParser, BoatCoachOTWParser,QuiskeParser,
|
MysteryParser, BoatCoachOTWParser,QuiskeParser,
|
||||||
painsledDesktopParser, speedcoachParser, ErgStickParser,
|
painsledDesktopParser, speedcoachParser, ErgStickParser,
|
||||||
SpeedCoach2Parser, FITParser, fitsummarydata,
|
SpeedCoach2Parser, FITParser, fitsummarydata,
|
||||||
make_cumvalues,cumcpdata,
|
make_cumvalues,cumcpdata,ExcelTemplate,
|
||||||
summarydata, get_file_type,
|
summarydata, get_file_type,
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -996,6 +996,11 @@ def save_workout_database(f2, r, dosmooth=True, workouttype='rower',
|
|||||||
|
|
||||||
def parsenonpainsled(fileformat,f2,summary):
|
def parsenonpainsled(fileformat,f2,summary):
|
||||||
# handle RowPro:
|
# handle RowPro:
|
||||||
|
if (fileformat == 'xls'):
|
||||||
|
row = ExcelTemplate(f2)
|
||||||
|
hasrecognized = True
|
||||||
|
|
||||||
|
|
||||||
if (fileformat == 'rp'):
|
if (fileformat == 'rp'):
|
||||||
row = RowProParser(f2)
|
row = RowProParser(f2)
|
||||||
hasrecognized = True
|
hasrecognized = True
|
||||||
|
|||||||
@@ -50,7 +50,7 @@ def validate_file_extension(value):
|
|||||||
ext = os.path.splitext(value.name)[1]
|
ext = os.path.splitext(value.name)[1]
|
||||||
valid_extensions = ['.tcx','.csv','.TCX',
|
valid_extensions = ['.tcx','.csv','.TCX',
|
||||||
'.CSV','.fit','.FIT','.zip','.ZIP',
|
'.CSV','.fit','.FIT','.zip','.ZIP',
|
||||||
'.gz','.GZ']
|
'.gz','.GZ','.xls']
|
||||||
if not ext in valid_extensions:
|
if not ext in valid_extensions:
|
||||||
raise ValidationError(u'File not supported!')
|
raise ValidationError(u'File not supported!')
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user