You may need to "view source" in your browser; also attached is a
snippet I used to test mod_wsgi but does not really use django.

-----Original Message-----
From: django-users@googlegroups.com
[mailto:django-users@googlegroups.com] On Behalf Of Jose
Sent: Thursday, June 07, 2012 4:35 PM
To: Django users
Subject: Django mod_wsgi + No data received in browser

I have the following code in wsgi.py and when I try viewing my site in a
browser I get a no data received message (Unable to load the webpage
because the server sent no data.)

I feel like I'm missing the part where this wsgi.py file loads the
actual contents of my site...

import os
import sys
import django.core.handlers.wsgi

# Reorder sys.path so new directories at the front.
sys.path = []
sys.path[:0] = ['/usr/bin/python26',
        '/home/deploy/envs/site/lib/python2.6/site-packages/
setuptools-0.6c11-py2.6.egg',
        
'/home/deploy/envs/site/lib/python2.6/site-packages/pip-1.1-
py2.6.egg',
        
'/home/deploy/envs/site/lib/python2.6/site-packages',
        
'/home/deploy/envs/site/lib/python2.6/site-packages/PIL',
                                '/usr/lib64/python26.zip',
                                '/usr/lib64/python2.6',
                                '/usr/lib64/python2.6/plat-linux2',
                                '/usr/lib64/python2.6/lib-tk',
                                '/usr/lib64/python2.6/lib-dynload',
                                '/usr/lib64/python2.6/site-packages',
        
'/usr/lib64/python2.6/site-packages/Numeric',
        
'/usr/lib64/python2.6/site-packages/gtk-2.0',
                                '/usr/lib/python2.6/site-packages',
                                '/home/deploy/web/cms.site.com']

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

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

--
You received this message because you are subscribed to the Google
Groups "Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/django-users?hl=en.

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.

Attachment: myapp.py
Description: myapp.py

Reply via email to