I'm trying to deploy my Django app into production on a shared server.
It seems I'm having problems with the Python path because I'm getting the error from the server: No module named products.models
However, when I go to the root of the app and run the shell the modules load fine.
'>>> from products.models import Answer
'>>> import sys
'>>> sys.path
['/home/SecretUserAcct/django-projects/review_app', ...]
The path above does point to the root of the Django app.
I'm guessing this is an issue with the Python path, but I'm not sure what is going wrong.
Here is the fcgi file: $ cat ~/public_html/django.fcgi
#!/usr/local/bin/python2.6
import sys
import os
# Insert PYTHONPATH values here, including the path to your application
#sys.path.insert(0, '<path_to_your_app_directory>')
sys.path.insert(0, '/home/SecretUserAcct/django-projects/')
# Provide the location of your application's settings file.
os.environ['DJANGO_SETTINGS_MODULE'] = 'review_app.settings'
from django.core.servers.fastcgi import runfastcgi
runfastcgi(method = "threaded", daemonize = "false", maxchildren=3, minspare=0, maxspare=1)
What understanding am I missing here?