email zip processing improved
This commit is contained in:
@@ -63,12 +63,14 @@ class Command(BaseCommand):
|
||||
z = zipfile.ZipFile(a.document)
|
||||
for f in z.namelist():
|
||||
f2 = z.extract(f,path='media/')
|
||||
title = os.path.basename(f2)
|
||||
wid = [
|
||||
make_new_workout_from_email(rr,f2[6:],name)
|
||||
make_new_workout_from_email(rr,f2[6:],title)
|
||||
]
|
||||
res += wid
|
||||
link = 'http://rowsandall.com/rowers/workout/'+str(wid[0])+'/edit'
|
||||
dd = send_confirm(rr.user,name,link)
|
||||
dd = send_confirm(rr.user,title,link)
|
||||
time.sleep(10)
|
||||
|
||||
else:
|
||||
# move attachment and make workout
|
||||
|
||||
Reference in New Issue
Block a user