Django apache mod-python setup (vista)

Django apache mod-python setup (vista)

I am trying to setup my development environment on my local vista machine (django+apache+mod-python+postgres) and for some reason I can't load the settings.

Everything works on the built-in server but not under apache.

Here is my httpd.conf

<Location "/">       SetHandler python-program       PythonHandler django.core.handlers.modpython       SetEnv DJANGO_SETTINGS_MODULE movies.settings       PythonOption django.root /movies       PythonDebug On       PythonPath "['C:/django'] + sys.path"   </Location> 

And Error:

ImportError at /  No module named main.urls  Request Method:     GET Request URL:    http://localhost/ Exception Type:     ImportError Exception Value:      No module named main.urls  Exception Location:  C:\Python25\lib\site-packages\django\utils\ in import_module, line 35 Python Executable:  C:\Program Files (x86)\Apache Software  Foundation\Apache2.2\bin\httpd.exe Python Version:     2.5.4 Python Path:    ['C:/django', 'C:\\Windows\\system32\\',  'C:\\Python25\\Lib', 'C:\\Python25\\DLLs', 'C:\\Python25\\Lib\\lib-tk', 'C:\\Program Files (x86)\\Apache Software Foundation\\Apache2.2', 'C:\\Program Files (x86)\\Apache Software Foundation\\Apache2.2\\bin', 'C:\\Python25', 'C:\\Python25\\lib\\site-packages', 'C:\\Program Files (x86)\\Apache Software Foundation\\Apache2.2/_externals'] 

how do I do a single point authentication with php, apache and LDAP


Passing query parameters to a C# CGI program in Apache on Windows
Where does your code for your project reside? The parent of the folder that contains your project should be on the Python path.

Subfolder for website on Mac OS X
Assuming main is your project name, and it's in C:\django\projects\main\ you'd need to have c:\django\projects\ on your python path..
How to use Wine from Apache/Php? - '/var/www' is not owned by you
Either that, or main.urls should be movies.urls in your
How to get the HTTP_HOST from Rails?

Parse file upload directly without writing to the file system

Will mod_gzip compress the cookies


Debug message “Resource interpreted as other but transferred with MIME type application/javascript”
I know that you asked this question a couple of weeks ago, but if you're still looking for help, you might try ServerFault.

If you have success, please report back here!.

88 out of 100 based on 88 user ratings 538 reviews