Пытаюсь сделать инетмагазин с использованием
mezzanine и Cartridge
Все идет хорошо:
virtualenv env
. env/bin/activate
pip install -U cartridge
mezzanine-project -a cartridge project
cd project/
python manage.py createdb --noinput
И даже запускается:
python manage.py runserver
.....
_d^^^^^^^^^b_
.d'' ``b.
.p' `q.
.d' `b.
.d' `b. * Mezzanine 3.1.10
:: :: * Django 1.6.8
:: M E Z Z A N I N E :: * Python 3.4.1
:: :: * SQLite 3.6.20
`p. .q' * Linux 2.6.32-504.el6.x86_64
`p. .q'
`b. .d'
`q.. ..p'
^q........p^
Дальше пытаюсь задеплоить проект:
gunicorn wsgi
Он стартует, но при обращении к порту 8000.
Получаю следующую ошибку:
Error handling request
Traceback (most recent call last):
File "/home/test/env/lib/python3.4/site-packages/django/conf/__init__.py", line 128, in __init__
mod = importlib.import_module(self.SETTINGS_MODULE)
File "/home/test/env/lib/python3.4/importlib/__init__.py", line 109, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 2254, in _gcd_import
File "<frozen importlib._bootstrap>", line 2237, in _find_and_load
File "<frozen importlib._bootstrap>", line 2212, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 321, in _call_with_frames_removed
File "<frozen importlib._bootstrap>", line 2254, in _gcd_import
File "<frozen importlib._bootstrap>", line 2237, in _find_and_load
File "<frozen importlib._bootstrap>", line 2224, in _find_and_load_unlocked
ImportError: No module named 'project'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/test/env/lib/python3.4/site-packages/gunicorn/workers/sync.py", line 93, in handle
self.handle_request(listener, req, client, addr)
File "/home/test/env/lib/python3.4/site-packages/gunicorn/workers/sync.py", line 134, in handle_request
respiter = self.wsgi(environ, resp.start_response)
File "/home/test/env/lib/python3.4/site-packages/django/core/handlers/wsgi.py", line 187, in __call__
self.load_middleware()
File "/home/test/env/lib/python3.4/site-packages/django/core/handlers/base.py", line 44, in load_middleware
for middleware_path in settings.MIDDLEWARE_CLASSES:
File "/home/test/env/lib/python3.4/site-packages/django/conf/__init__.py", line 54, in __getattr__
self._setup(name)
File "/home/test/env/lib/python3.4/site-packages/django/conf/__init__.py", line 49, in _setup
self._wrapped = Settings(settings_module)
File "/home/test/env/lib/python3.4/site-packages/django/conf/__init__.py", line 132, in __init__
% (self.SETTINGS_MODULE, e)
ImportError: Could not import settings 'project.settings' (Is it on sys.path? Is there an import error in the settings file?): No module named 'project'