0

This is my django.wsgi file:

import os
import sys

path1 = '/srv/site/app'
path2 = '/srv/site'

if path1 not in sys.path:
    sys.path.insert(0,path1)

if path2 not in sys.path:
    sys.path.insert(1,path2)

os.environ['DJANGO_SETTINGS_MODULE'] = 'app.settings'

import django.core.handlers.wsgi
application = django.core.handlers.wsgi.WSGIHandler()

    ImportError: Could not import settings 'app.settings' (Is it on sys.path?): No module named app.settings

Apache did not find the settings file. I can't figure out when went wrong.

1 Answer 1

1
import os

os.environ.setdefault("DJANGO_SETTINGS_MODULE", "project_name.settings")

from django.core.wsgi import get_wsgi_application
application = get_wsgi_application()
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.