On Mon, Sep 8, 2008 at 10:28 AM, Griblik <[EMAIL PROTECTED]> wrote:

>
> Hi all,
>
> I'm having a problem with an app viewed through apache. I'm fairly
> sure it's going to be something obvious, I just can't see what it is.
>
> Basically, when I try to view the landing page for the project at /
> recipe/ I get a 404 as follows:
>
> "Using the URLconf defined in recipe.urls, Django tried these URL
> patterns, in this order:
>
>   1. ^static/(?P<path>.*)$
>   2. ^recipe/admin/(.*)
>   3. ^recipe/$
>   4. ^recipe/search/
>   5. ^recipe/browse/
>   6. ^recipe/list/$
>   7. ^recipe/type/(?P<foodtype>[\d]+)/$
>   8. ^recipe/chef/(?P<chefid>[\d]+)/$
>   9. ^recipe/method/(?P<methodid>[\d]+)/$
>  10. ^recipe/cuisine/(?P<cuisineid>[\d]+)/$
>  11. ^recipe/course/(?P<courseid>[\d]+)/$
>  12. ^recipe/season/(?P<seasonid>[\d]+)/$
>  13. ^recipe/programme/(?P<programmeid>[\d]+)/$
>  14. ^recipe/ingredient/(?P<ingredient>[\d]+)/$
>  15. ^recipe/recipe/(?P<recipe_id>\d+)/$
>
> The current URL, recipe/, didn't match any of these."
>
> I can't work out why "recipe/" doesn't match the 3rd line - "^recipe/
> $". Configs below, and any ideas or suggestions would be very much
> appreciated. This works fine using manage.py runserver, just not when
> fronted with apache.
>
> I confess I'm stumped.
>
> httpd.conf:
> <Location "/recipe/">
>    SetHandler python-program
>    PythonHandler django.core.handlers.modpython
>    SetEnv DJANGO_SETTINGS_MODULE recipe.settings
>    SetEnv PYTHON_EGG_CACHE /usr/local/django-tmp
>    PythonInterpreter recipe
>    PythonOption django.root /recipe
>    PythonDebug On
>    PythonPath "['/usr/local/django-apps/'] + sys.path"
> </location>
>
> urls.py:
> [snipped]


You've got "PythonOption django.root /recipe" in there, which according to
the doc (http://docs.djangoproject.com/en/dev/howto/deployment/modpython/)
will strip '/recipe' from "the front of any URLs before matching them
against your URLConf patterns".  (If this is the problem, it does seem a bit
odd that the error message includes the stipped part.)

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