Search code examples
djangodisqus

django-disqus with django 1.4.8


I'm receiving this error when I add disqus to the INSTALLED_APP:

Error: No module named urllib.parse

I tracked this down to the following line:

from django.utils.http import urlencode
from django.utils.six.moves.urllib.error import URLError
from django.utils.six.moves.urllib.request import (
    ProxyHandler,
    Request,
    urlopen,
    build_opener,
    install_opener
)

I know that six.moves is not included with django 1.4.8, is there any substitute?

Thanks


Solution

  • Six is an external library, which Django includes for convenience.

    You could try installing six separately, and change the imports, for example change

    from django.utils.six.moves.urllib.error import URLError
    

    to

    from six.moves.urllib.error import URLError