support for gzip file to prepare new workouts
This commit is contained in:
@@ -48,7 +48,9 @@ def format_time(x,pos=None):
|
||||
def validate_file_extension(value):
|
||||
import os
|
||||
ext = os.path.splitext(value.name)[1]
|
||||
valid_extensions = ['.tcx','.csv','.TCX','.CSV','.fit','.FIT','.zip','.ZIP']
|
||||
valid_extensions = ['.tcx','.csv','.TCX',
|
||||
'.CSV','.fit','.FIT','.zip','.ZIP',
|
||||
'.gz','.GZ']
|
||||
if not ext in valid_extensions:
|
||||
raise ValidationError(u'File not supported!')
|
||||
|
||||
|
||||
Reference in New Issue
Block a user