Dajaxice javascript core file not getting parsed

后端 未结 1 1555
迷失自我
迷失自我 2021-01-06 07:04

I\'ve been looking everywhere for answer to my questions last few hours and couldn\'t find anything, so i decided to ask.

I followed installation instruction in docs

相关标签:
1条回答
  • 2021-01-06 07:24

    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.
    0 讨论(0)
提交回复
热议问题