title: ImportError: cannot import name 'StringType'
body: <p>I took some sample code that was made in the django version 1.8.4, and like Python 2.7 when transferred to 3 python all flown away and produced such an error, how to fix it?</p>
  
  <pre><code>\lib\site-packages\config.py", line 91, in &lt;module&gt;
          from types import StringType, UnicodeType
      ImportError: cannot import name 'StringType'
  </code></pre>
  
  <p>one piece of code where using stringtype (config.py)(in site-packages)</p>
  
  <pre><code>def writeValue(self, value, stream, indent):
          if isinstance(self, Mapping):
              indstr = ' '
          else:
              indstr = indent * '  '
          if isinstance(value, Reference) or isinstance(value, Expression):
              stream.write('%s%r%s' % (indstr, value, NEWLINE))
          else:
              if (type(value) is StringType): # and not isWord(value):
                  value = repr(value)
              stream.write('%s%s%s' % (indstr, value, NEWLINE))
  </code></pre>