django-awesome-avatar icon indicating copy to clipboard operation
django-awesome-avatar copied to clipboard

Added compatibility for StringIO when Python 3.x is being used

Open devrique opened this issue 7 years ago • 1 comments

I was having problems using Python 3.5.3 with Django 1.11, so I checked the error and it was a subtile incompatibility with Python 3.x. Now it can use the classes it was trying to import, and if it returns an error, it can try to import the Python 3.x class.

devrique avatar May 03 '17 10:05 devrique

HI! Thank you all for the great effort I think that the amendment must be made, as the owner of the problem said. I do not think that there is a big change in that, or that it conflicts with something existing. Good luck🙂

in

try:
    from cStringIO import StringIO
except ImportError:
    try:
        from StringIO import StringIO
    except ImportError:
        from io import StringIO

mohammed-Emad avatar Aug 07 '20 01:08 mohammed-Emad