Open charly24 opened 7 years ago
refs: https://github.com/RyanBalfanz/django-sendgrid/issues/73 My project is Python3. So I fixed some compatibility below.
dict.iteritems to dict.items
dict.iteritems
dict.items
import urllib2 to
import urllib2
try: import urllib.request as urllib2 except ImportError: import urllib2
import simplejson as json to
import simplejson as json
try: import simplejson as json except ImportError: import json
isinstance(categoryData, basestring): to
isinstance(categoryData, basestring):
from six import string_types isinstance(categoryData, string_types)
import StringIO to
import StringIO
try: import StringIO except ImportError: from io import StringIO
remove unused import httplib
import httplib
remove some . and spaces.
.
https://github.com/RyanBalfanz/django-sendgrid/pull/76/files?w= (diff without spaces)
refs: https://github.com/RyanBalfanz/django-sendgrid/issues/73 My project is Python3. So I fixed some compatibility below.
dict.iteritems
todict.items
import urllib2
toimport simplejson as json
toisinstance(categoryData, basestring):
toimport StringIO
toremove unused
import httplib
remove some
.
and spaces.https://github.com/RyanBalfanz/django-sendgrid/pull/76/files?w= (diff without spaces)