On Thu, May 29, 2008 at 1:40 PM, Eric <[EMAIL PROTECTED]> wrote:

>
> I simply cannot get this to work. I am attempting to run Python/Django
> on Apache/Windows. When I run the mpinfo it shows the mod_python
> service is available, but i cannot even view the most simple example
> shown in the online book (current_datetime view).  I am using the
> basic installation (ie my project is in the 'mysite' directory of my
> wwwroot (c:/websites/ericlezotte/mysite/) and my simple view is in the
> 'mysite/views.py' file.  When I browse this view to test it at 'http://
> www.ericlezotte.com/time/' I get a 404 error.  ANY help with this
> would be greatly appreciated.  Below is my Apache config code for this
> site is:
>
> <VirtualHost *:80>
>   ServerName www.ericlezotte.com
>   DocumentRoot "C:/Websites/ericlezotte/"
>   UserDir "C:/Websites/ericlezotte/"
>   ServerAlias ericlezotte.com *.ericlezotte.com
>
>   <Location "/mysite/">
>     SetHandler python-program
>     PythonHandler django.core.handlers.modpython
>     SetEnv DJANGO_SETTINGS_MODULE mysite.settings
>     PythonDebug On
>     PythonPath "['c:/websites/ericlezotte'] + sys.path"
>   </Location>
>
> </VirtualHost>
>

Via <Location "/mysite/"> you've told Apache to direct URLs that start with
"/mysite/" to your Django code. But http://www.ericlezotte.com/time/ doesn't
start with "/mysite/", it starts with "/time/", so it doesn't get directed
to your code.  Either change the Location to "/" so everything gets routed
to Django (you can override subtrees for media, etc. with subsequent
<Location> blocks), or include "/mysite/" at the beginning of your urls.

Karen

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

Reply via email to