On Tue, 2007-10-30 at 22:20 +0000, Graham Dumpleton wrote:
> On Oct 31, 1:15 am, [EMAIL PROTECTED] wrote:
> > This issue has come up for many people in many places, but most of the
> > threads seem old, and none of the solutions proposed has helped.
> >
> > I have a django installation in a subdirectory of a site, like 
> > so:www.mysite.com/django. At first I noticed a problem with the admin
> > login, like other people have had (where the /django/ portion of the
> > url is removed when you try to login, leading to a 404), and solved it
> > by copying some of the admin template pages into my own project
> > template directory.
> >
> > It appears that the problem also affects ALL url tags in my templates:
> > using the {% url path/to/view %} tag produces a URL which doesn't
> > include the /django/ section, meaning it's invalid. Trying to cheat
> > like this:
> > href="/django{% url path/to/view %}"
> > produces the correct url in the template page, but when I actually
> > click the link, django removes the /django/ section from the url in
> > the browser address bar, and then tells me it can't find the page.
> >
> > I've tried adding r'^django/' at the front of the urls in my url
> > config, but that just results in none of the urls matching.
> >
> > Does anyone have an explanation or a solution for this?
> 
> If you use mod_wsgi, it contains instructions for how to mount
> application on a sub url rather than at root. To make it all work
> requires doing a workaround in the WSGI wrapper around Django to cope
> with Django not recognising SCRIPT_NAME variable properly. Also
> necessary to ensure urls.py path include prefix as well. See:
> 
>   http://code.google.com/p/modwsgi/wiki/IntegrationWithDjango
> 
> This has links to relevant Django tickets where the problem is raised.

It also includes the inaccurate statement that the lack of SCRIPT_NAME
and full path support "would not be fixed as developers wouldn't
acknowledge it was a problem that Django needed to deal with." It's both
acknowledged as a problem and something we will fix at some point.
Ticket #285 was closed by somebody who wasn't a developer. It's only
recently somebody's written a patch to correct this problem and it's in
the "to be reviewed" queue.

A minor quibble, but let's try to focus on the positives instead of
attempting to assign blame where it isn't warranted.

Thanks,
Malcolm

-- 
If at first you don't succeed, destroy all evidence that you tried. 
http://www.pointy-stick.com/blog/


--~--~---------~--~----~------------~-------~--~----~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to