google app engine if images not found set default images
I follow the tutorial on the google app engine Using the images python API http://code.google.com/appengine/docs/python/images/usingimages.html, my question is that how do I modify the code
if greeting.avatar:
self.response.headers['Content-Type'] = "image/png"
self.response.out.write(greeting.avatar)
else:
self.error开发者_如何学运维(404)
instead of displaying error, how to I display a default image (static jpeg etc)?
self.redirect("path/to/static/image")
精彩评论