I am getting this error. The problem is that the message is correct: there is no such module because 'myappname.settings' is renamed 'myappname1.settings'. Unfortunately, WSGI is still looking for this old location. How can I make it look for 'myappname1.settings' instead of 'myappname.settings'?
import os
import sys
path = '/home/somethingfortest1/myappname1'
if path not in sys.path:
sys.path.append(path)
os.environ['DJANGO_SETTINGS_MODULE'] = 'myappname1.settings'
from django.core.wsgi import get_wsgi_application
application = get_wsgi_application()