Private
Public Access
1
0

first holoview chart

This commit is contained in:
Sander Roosendaal
2019-02-26 22:11:28 +01:00
parent 5ba0aee1dd
commit f538dc849e
13 changed files with 250 additions and 64 deletions

View File

@@ -57,7 +57,7 @@ def processattachment(rower, fileobj, title, uploadoptions,testing=False):
except AttributeError:
filename = fileobj[6:]
if testing:
print 'Attribute Error', filename
print('Attribute Error', filename)
# test if file exists and is not empty
@@ -66,11 +66,11 @@ def processattachment(rower, fileobj, title, uploadoptions,testing=False):
line = fop.readline()
except (IOError, UnicodeEncodeError):
if testing:
print 'IOError',filename,'media/'+filename
print('IOError',filename,'media/'+filename)
return 0
if testing:
print 'Creating workout from email'
print('Creating workout from email')
# set user
if rower.user.is_staff and 'username' in uploadoptions:
@@ -102,7 +102,7 @@ def processattachment(rower, fileobj, title, uploadoptions,testing=False):
pass
if testing:
print 'Workout id = {workoutid}'.format(workoutid=workoutid)
print('Workout id = {workoutid}'.format(workoutid=workoutid))
if workoutid[0]:
link = settings.SITE_URL+reverse(
@@ -242,17 +242,17 @@ class Command(BaseCommand):
testing=testing
)
except:
print "Bad ZIP file"
print attachment.document.name
print("Bad ZIP file")
print(attachment.document.name)
else:
# move attachment and make workout
if testing:
try:
print name
print(name)
except UnicodeEncodeError:
print "Unicode Error"
print("Unicode Error")
try:
print attachment.document
print(attachment.document)
except UnicodeEncodeError:
pass