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
In my case the wsgi.py file was working when the system was running normally, but I was getting the ImportError when trying to do a manual manage.py command like migrate or collectstatic.
I checked wsgi.py for the way it imports the settings and noticed that it first adds the settings path to the sys.path as follows:
import sys
sys.path.append('/opt/server/settings')
I added that to the top of the manage.py and it works.