Dajaxice javascript core file not getting parsed

末鹿安然 提交于 2019-11-30 21:57:12

I advice you to check STATICFILES_FINDERS settings and other settings related to django.contrib.staticfiles app. Dajaxice uses a hook in this app to generate dajaxice.core file.

When you use debug server this static file is generated on the fly, on production environment the file will be generated when you run collectstatic command.

In your case it looks like the dajaxice.core.js file is founded by another static finder or served in any other way.

To check this please run the following command

python manage.py findstatic dajaxice/dajaxice.core.js

The output should look like

Found 'dajaxice/dajaxice.core.js' here:
  /tmp/tmp9nzeEd

The filename in tmp dir will be different

Also 2 pitfalls with collect static app:

  1. When you update your ajax.py file to include new dajaxice views you have to run collectstatic again
  2. The file is generated in /tmp/ folder. So if you use -l key to generate links instead of copying files make sure that you will not remove this file by accident.
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!