python django ajax : ValueError: The view didn't return an HttpResponse object. It returned None instead

后端 未结 1 331
灰色年华
灰色年华 2020-12-22 08:50

I know such questions exist gallore in SO. But none satisfies my problem. My code however works in localhost in my PC but not in online server. The site is

相关标签:
1条回答
  • 2020-12-22 09:53

    The issue is that the server is using .pyc files as pointed out in the comments.

    Depending on how you are hosting the site, you will need to restart your Django Server process to trigger updates and recompilation of .pyc files.

    For Gunicorn, this post discusses how to autoload on changes. gunicorn autoreload on source change

    If you aren't using Gunicorn and post more about your server setup, I'll edit it this to match your use case.

    0 讨论(0)
提交回复
热议问题