cleaning up
This commit is contained in:
@@ -7627,34 +7627,39 @@ def workout_upload_view(request,
|
||||
plottype = 'timeplot'
|
||||
|
||||
try:
|
||||
upload_toc2 = uploadoptions['upload_to_C2']
|
||||
landingpage = uploadoptions['landingpage']
|
||||
except KeyError:
|
||||
upload_toc2 = False
|
||||
landingpage = r.defaultlandingpage
|
||||
|
||||
try:
|
||||
upload_tostrava = uploadoptions['upload_to_Strava']
|
||||
upload_to_c2 = uploadoptions['upload_to_C2']
|
||||
except KeyError:
|
||||
upload_tostrava = False
|
||||
upload_to_c2 = False
|
||||
|
||||
try:
|
||||
upload_tost = uploadoptions['upload_to_SportTracks']
|
||||
upload_to_strava = uploadoptions['upload_to_Strava']
|
||||
except KeyError:
|
||||
upload_tost = False
|
||||
upload_to_strava = False
|
||||
|
||||
try:
|
||||
upload_tork = uploadoptions['upload_to_RunKeeper']
|
||||
upload_to_st = uploadoptions['upload_to_SportTracks']
|
||||
except KeyError:
|
||||
upload_tork = False
|
||||
upload_to_st = False
|
||||
|
||||
try:
|
||||
upload_toua = uploadoptions['upload_to_MapMyFitness']
|
||||
upload_to_rk = uploadoptions['upload_to_RunKeeper']
|
||||
except KeyError:
|
||||
upload_toua = False
|
||||
upload_to_rk = False
|
||||
|
||||
try:
|
||||
upload_totp = uploadoptions['upload_to_TrainingPeaks']
|
||||
upload_to_ua = uploadoptions['upload_to_MapMyFitness']
|
||||
except KeyError:
|
||||
upload_totp = False
|
||||
upload_to_ua = False
|
||||
|
||||
try:
|
||||
upload_to_tp = uploadoptions['upload_to_TrainingPeaks']
|
||||
except KeyError:
|
||||
upload_to_tp = False
|
||||
|
||||
if request.method == 'POST':
|
||||
form = DocumentsForm(request.POST,request.FILES)
|
||||
@@ -7832,7 +7837,6 @@ def workout_upload_view(request,
|
||||
return response
|
||||
else:
|
||||
form = DocumentsForm(initial=docformoptions)
|
||||
print uploadoptions
|
||||
optionsform = UploadOptionsForm(initial=uploadoptions)
|
||||
return render(request, 'document_form.html',
|
||||
{'form':form,
|
||||
|
||||
Reference in New Issue
Block a user