Jump to content

Django WSGI 500 error


Recommended Posts

I am trying to set up a Django project. I followed the directions on http://www.heliohost.org/home/features/languages/python, but I am getting a 500 error on line 9.

 

My username is aboyce

The domain I am testing is http://www.klickfu.heliohost.org/klickfu/dispatch.wsgi/hello

 

I copied the dispatch.wsgi file directly from the instructions (with the appropriate mods for paths). Here is what I am using:

 

 

import os, sys 
sys.path.append("/home/aboyce/public_html/klickfu"); 
os.environ['DJANGO_SETTINGS_MODULE'] = 'settings' 
os.environ['PYTHON_EGG_CACHE'] = '/home/aboyce/.python_egg_cache' 
import django.core.handlers.wsgi 
_application = django.core.handlers.wsgi.WSGIHandler() 
def application(environ, start_response): 
    environ['PATH_INFO'] = environ['SCRIPT_NAME'] + environ['PATH_INFO'] 
    return _application(environ, start_response)

 

Permissions were set as per instructions.

 

The topics that concerned this were all handled a year ago. The links for Byron's djangotest.zip have goen away.

Any help would be appreciated.

Link to comment
Share on other sites

Is your home directory home1 or home?

 

Here's the working zip:

 

http://byrondallas.heliohost.org/djangtest.zip

 

Make sure you edit dispatch.wsgi to match your site and chmode the egg chache to 777.

 

http://byrondallas.heliohost.org/djangotest/dispatch.wsgi

 

 

Thanks, I got it working. Turns out the problem was with both my dispatcher.wsgi and settinys.py files. Your samples helped a lot. You might want to put a link to the zip file on the Python & DJango page. Thanks again.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...