better numbering for zip file content
This commit is contained in:
@@ -134,7 +134,11 @@ class Command(BaseCommand):
|
||||
zip_file = zipfile.ZipFile(attachment.document)
|
||||
for id,filename in enumerate(zip_file.namelist()):
|
||||
datafile = zip_file.extract(filename, path='media/')
|
||||
title = name+' ('+str(id)+')'
|
||||
if id>0:
|
||||
title = name+' ('+str(id+1)+')'
|
||||
else:
|
||||
title = name
|
||||
|
||||
workoutid = processattachment(
|
||||
rower, datafile, title, uploadoptions,
|
||||
testing=testing
|
||||
|
||||
Reference in New Issue
Block a user