我刚刚设置了Django和Dajaxice,在仔细检查了Django-set和Dajaxice的文档之后,我很难让它正常工作。在
在对堆栈溢出进行了一些研究之后,我唯一发现的就是确保我的网址.py,我知道。这是我的py.ajax版在我的时间里,我要做的是:
from django.utils import simplejson
from dajaxice.decorators import dajaxice_register
@dajaxice_register
def sayhello(request):
return simplejson.dumps({'message':'Hello World'})
和我的html页面
^{pr2}$我得到的错误是
FunctionNotCallableError at /dajaxice/TimeBlendApp.sayhello/
TimeBlendApp.sayhello
Request Method: GET
Request URL: http://127.0.0.1:8000/dajaxice/TimeBlendApp.sayhello/
Django Version: 1.5.1
Exception Type: FunctionNotCallableError
Exception Value:
TimeBlendApp.sayhello
Exception Location: C:\Python27\lib\site-packages\dajaxice\views.py in dispatch, line 60
你必须跑
每次更改或添加dajax/dajaxice功能。所以dajaxice可以在静态目录中创建自己的javascript库。在
相关问题 更多 >
编程相关推荐