Note that there are some explanatory texts on larger screens.

plurals
  1. POpassenger_wsgi.py not working properly with django
    primarykey
    data
    text
    <p>I am hosting my Django application on Dreamhost. Dreamhost serves Django-1.2.1 on Python-2.5.2, but I use Django-1.3.1 on Python-2.7.2, for my app.<br/> before making any changes to meet my requirements, the passenger_wsgi.py contained the following:</p> <pre><code>import sys, os sys.path.append(os.getcwd()) sys.path.insert(1, '/home/username/example.com/projects') os.environ['DJANGO_SETTINGS_MODULE'] = "projectname.settings" import django.core.handlers.wsgi application = django.core.handlers.wsgi.WSGIHandler() </code></pre> <p>the app runs but with some missing modules because of the old version of Django.<br></p> <p>So I installed python-2.7.2 on /home/username/opt/Python-2.7.2, and then installed Django-1.3.1 on it using pip tool.</p> <p>and made some changes to passenger_wsgi.py to make the app run on python-2.7.2. and became like this:</p> <pre><code>import sys, os # makes sure the interpreter executable is python2.7 INTERP = os.path.join(os.environ['HOME'], 'opt', 'Python-2.7.2', 'bin', 'python2.7') if sys.executable != INTERP: os.execl(INTERP, INTERP, *sys.argv) sys.path.append(os.getcwd()) sys.path.insert(1, '/home/username/example.com/projects') os.environ['DJANGO_SETTINGS_MODULE'] = "projectname.settings" import django.core.handlers.wsgi application = django.core.handlers.wsgi.WSGIHandler() </code></pre> <p>when I try to run the code again, the following error rises</p> <blockquote> <p>An error occurred importing your passenger_wsgi.py</p> </blockquote> <p>can anyone help??</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload