django 1.7 does not support python 2.6
django 1.4 does not support python 3
fixed StringIO python 2/3 compatibility