I am trying to get a django second site running on Dreamhost. I kept the set up almost exactly the same as my first site, which works, but I cannot get collect static to work. When I run manage.py validate
it returns no errors but django-admin gives this
...
File "/home/username/<virtualenv>/lib/python2.7/site-packages/django/conf/__init__.py", line 134, in __init__
raise ImportError("Could not import settings '%s' (Is it on sys.path?): %s" % (self.SETTINGS_MODULE, e))
ImportError: Could not import settings '<project>.settings.production' (Is it on sys.path?): No module named <project>.settings.production
I have set the DJANGO_SETTINGS_MODULE
to <project>.settings.production
and in the passenger_wsgi.py
I have added the settings directory to the path.
I am using django 1.5.5. Could this be due to multiple sites?
EDIT Collectstatic is not available under either of the 2 methods.
EDIT I just noticed that the wsgi.py
has not been compiled. Could this be part of the problem?
Since you set
DJANGO_SETTINGS_MODULE
to<project>.settings.production
what you need to add tou yoursys.path
is not the settings directory path but the path to<project>
's parent directory.