master
Nick Sergeant 2012-07-08 14:34:36 -04:00
parent 688deb69a4
commit 67bf326c15
1 changed files with 2 additions and 4 deletions

View File

@ -44,12 +44,10 @@ def amazon_image(request):
try:
open(img_loc)
return HttpResponseRedirect('/static/images/amazon/' + img_filename)
return HttpResponseRedirect('https://snipt.net/static/images/amazon/' + img_filename)
except IOError:
urllib.urlretrieve(img_src, img_loc)
return HttpResponseRedirect('/static/images/amazon/' + img_filename)
return HttpResponseRedirect('/static/images/amazon/' + img_filename)
return HttpResponseRedirect('https://snipt.net/static/images/amazon/' + img_filename)
else:
return HttpResponseBadRequest()
return {}