Django Shell No module named settings

后端 未结 12 1405
温柔的废话
温柔的废话 2020-12-02 20:26

I\'ve deployed Django to Apache via mod_wsgi. Django is running fine when hosted from Apache. However, I\'m trying to do some maintenance via manage.py

12条回答
  •  长情又很酷
    2020-12-02 21:29

    For me it was actually the PATH, so the project wasn't inside the path, I did this:

    export PYTHONPATH=/var/www/project:$PYTHONPATH

    If it's a local project it might be something like this:

    export PYTHONPATH=~/my-project:$PYTHONPATH

    Questions? comment and I'll answer.

提交回复
热议问题