webfactionサーバーの下に「Hesperides」という名前の私のdjangoプロジェクトを展開しています。Webfaction のデフォルトのプロジェクトのフォルダーは「myproject」なので、次のエラーが発生します。
ImportError: Could not import settings 'myproject.settings' (Is it on sys.path?): No module named myproject.settings
質問は: myproject.settings の代わりに Hesperides.settings から設定をインポートするにはどうすればよいですか? 御時間ありがとうございます。
私のhttpd.conf:
WSGIDaemonProcess jinn processes=2 threads=12 python-path=/home/zeioth/webapps/jinn:/home/zeioth/webapps/jinn/myproject:/home/zeioth/webapps/jinn/lib/python2.7:
WSGIScriptAlias / /home/zeioth/webapps/jinn/myproject/Hesperides/wsgi.py
私の wsgi.py
import os
import sys
from django.core.handlers.wsgi import WSGIHandler
os.environ['DJANGO_SETTINGS_MODULE'] = 'Hesperides.settings'
application = WSGIHandler()
私のフォルダツリー:
jinn
--apache2
-bin
--conf
-httpd.conf
-mime.types
-lib
-logs
-modules
-bin
-lib
--myproject
-manage.py
--Hesperides
-wsgi.py
-urls.py
-__init__.py
-settings.py
-apps