You don't show where the 'Image' object comes from (in Image.open), so I can't be specific, but here are some generalities:
"Incorrect padding" is probably a message from the base 64 decoder. Capture your request.POST[photo] to play with separately. If you are doing this under the development server you can add a pdb.set_trace() to get a prompt where you can play with things. Alternatively, put the decode and the StringIO creation in separate statements so the the line generating the error will be clear.
Are you sure that the image is base 64? If it's coming from a file field in an HTML form, it probably isn't, which would explain the decode error (it I'm correct and it is a decoder error).
It is customary to store images on the file system, putting only the path to the file in the database, as part of a model instance. That way the front end server (Apache or nginx, etc.) can serve the images without involving python and the database.. There are image oriented model fields available in django to facilitate this, see the excellent documentation.
If, for whatever reason, you must store the image in the database, you can store it as a (binary) string. If your image object makes the data available as a string, there will be no need to pump it through a StringIO object.