﻿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
4889	Help solve a potential deployment problem (mod_python)	davep@…	Jacob	"I've been trying all evening to deploy an application that goes fine with 'runserver' but won't go with mod_python. The error I was getting was an exception - !ViewDoesNotExist - being raised by the URL parser failing to find my views on the path. For some reason. Messing around with the value of !PythonPath in the Apache configuration led to a dilemma where one would break Python itself and the other would break Django. In a moments inspiration I just gave it both paths and it worked a treat. My current config is as below:
{{{
root@gateway:/var/www/dev-ad1-dyn.atomicdroplet/django_ad_serve# cat /etc/apache2/sites-available/django_ad_serve 
<VirtualHost *:80>
#Ordinary webserving
        ServerAdmin davep@atomicdroplet.com
        ServerName dev-ad1-dyn.atomicdroplet.com
#Django
        <Location ""/"">
        SetHandler python-program
        PythonHandler django.core.handlers.modpython
        SetEnv DJANGO_SETTINGS_MODULE django_ad_serve.settings
        PythonPath ""['/var/www/dev-ad1-dyn.atomicdroplet/','/var/www/dev-ad1-dyn.atomicdroplet/django_ad_serve/']+sys.path""
        PythonDebug On
        </Location>
</VirtualHost>
}}}
This ticket is requesting that some similar advice is dispensed in the deployment documentation and perhaps in the FAQ around !ViewDoesNotExist. It was particularly frustrating in that runserver worked just fine.

Thanks,
Dave"		closed	Documentation	dev		duplicate	deployment		Unreviewed	0	0	0	0	0	0
