1
I made the settings to work Django with Apache, but always gives the following error:
cannot be Loaded as Python module
My file:
import os
import sys
sys.path.append('/home/myuser/public/site.com.br/public_html/app/')
sys.path.append('/home/myuser/public/site.com.br/public_html/')
os.environ['DJANGO_SETTINGS_MODULE'] = 'site.settings'
from django.core.wsgi import get_wsgi_application
application = get_wsgi_application()
I tried the permision sudo chmod a+x, still I could not.
I solved, it was an app that was missing, so was giving this error.
– csassis
Can you post which app was giving error, please? It may be useful to other users.
– Leonardo Pessoa
The problem was a module of Django that was not installed.
– csassis