On Jan 19, 3:02 am, JCorey <jrco...@gmail.com> wrote:
> On Jan 18, 9:39 am, ptone <pres...@ptone.com> wrote:
>
> > In the tutorial, the form action in the poll_detail template is
> > hardcoded to "/polls/..."
>
> > So the browser is doing what's been explicitly asked of it, despite
> > Django doing its best to deal gracefully with your mounting the app
> > at /mysite.
>
> The same thing happens with Apache and mod_python. Mod_python has the
> django.root setting, which the documentation only says it uses to
> strip the leading path (/mysite) out of URIs. Perhaps the reverse()
> function isn't looking at that to put the path back into the URIs.
> I'm still new, so I'm not sure how to properly do this...
In mod_python django.root is needed because mod_python is a bit broken
and can't guarantee a correct value for SCRIPT_NAME. In mod_wsgi the
value of SCRIPT_NAME should always be correct and Django will use it
as same thing. If your code/templates aren't though using the
appropriate mechanisms to ensure that prefix is added back in in front
of generated URLs, you will still have a problem.
Sorry, I don't know Django well enough to know what the mechanism is
to ensure that URLs are constructed properly with the prefix.
Graham
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to
django-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---