﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
15526	Handling of Python path in wsgi script.	douglaswrg	nobody	"Following the Django guide from creating a project to configuring mod_wsgi does not lead to a working application.  The problem seems to be similar in nature to [ticket:12056].  One of the comments states that the documentation covers ""the common case"".  As I haven't yet deployed Django in a production with mod_wsgi, maybe I'm missing something.  I have deployed it successfully with mod_python in the past, however.

The difference between the documentation and what works in my situation is that both the project directory and its parent directory must be included in the python path.  One or the other by itself generates a traceback.

Details of the system this was seen on (Snow Leopard):[[BR]]
Apache 2.2.15[[BR]]
mod_wsgi 3.3[[BR]]
Python 2.6.1[[BR]]
Django 1.2.5[[BR]]
[[BR]]

Example wsgi script that works:

{{{
import os, sys
project_space='/projects/'
sys.path.insert(0, project_space + 'mytest')
sys.path.insert(0, project_space)
os.environ['DJANGO_SETTINGS_MODULE'] = 'mytest.settings'

import django.core.handlers.wsgi

application = django.core.handlers.wsgi.WSGIHandler()
}}}
"		closed	Uncategorized	1.2		duplicate	mod_wsgi path settings		Unreviewed	0	0	0	0	0	0
