我是django noob。我刚在项目应用程序中添加了dojango 0.5.5。我使用Django 1.5,当我尝试在mysite / dojango / test /我的测试页面dojango提供时出现此错误:
__init__() got an unexpected keyword argument 'namedtuple_as_object'
错误发生在dojango基本模板文件中,其中包含:
'isDebug':{{ DOJANGO.DEBUG|json }},
有人遇到过这个问题吗?你是如何解决的?
答案 0 :(得分:2)
我找到了similar issue。试着找
from django.utils import simplejson as json
并将其替换为
try:
import json
except ImportError:
from django.utils import simplejson as json