How to solve the ImportError: cannot import name simplejson in Django

后端 未结 3 1418
长情又很酷
长情又很酷 2021-02-19 20:44

I\'m trying to build a realtime chat app in Django(1.7.1). It seems that I needed to install Redis and ishout.js. So I installed them by following the instructions.

Aft

3条回答
  •  野的像风
    2021-02-19 21:03

    I think the above answers are workarounds.

    Django used to ship with simplejson in django.utils, but this was removed in Django 1.5 because json module being available in Python’s standard library.

    So you should now import json instead of from django.utils import simplejson, and make necessary changes where simplejson methods are called.

提交回复
热议问题