On Jul 27, 2:49 pm, SmileyChris <[EMAIL PROTECTED]> wrote: > On Jul 27, 4:16 pm, Graham Dumpleton <[EMAIL PROTECTED]> > wrote: > > > Ahh, I read the way the patch was being applied the wrong way > > around. :-( > > > Anyway, one potential reason why using req.uri may be bad is that > > Apache does not do complete normalisation on it. Thus, one can get > > repeating slashes which can cause the URL not to match a URL pattern > > unless Django is at some point normalising it which I don't know if it > > does or not. The req.path_info value on the other hand is normalised > > properly. > > Uh, for mod_python handler, Django is *already* using req.uri. Nearly > everywhere in Django, we use request.path, which is filled from > req.uri > > I'm making the change to request.META['PATH_INFO'] which isn't used > anywhere (important) in Django anyway. > > > > Since I changed the url resolver to work with PATH_INFO rather than > > > request.path, it won't break reverse resolving even for Request > > > handlers which use SCRIPT_NAME. > > From memory, one of the issues is that if one is going to have Django > > understand the larger concept of SCRIPT_NAME, then it would be > > desirable to be able to provide in urls.py URL patterns which are > > anchored, but expressed relative to the SCRIPT_NAME mount point. > > This is exactly why I wrote the patch, and it does it without stepping > on toes. > > URL patterns are archored
I'll have to plead then that I don't understand the implications of the change you made to base.py. I guess that is what I get for commenting when I don't even use Django myself. :-) All I know is that the change in wsgi.py by itself is more or less the same one I suggest as a workaround for mod_wsgi to allow mounting Django at point other than root, and with only that change you still need to provide the mount point, ie., SCRIPT_NAME, in urls.py. It sounds like you are saying then that the base.py change results in what I refer to as the desirable behaviour for urls.py. Graham --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django developers" 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-developers?hl=en -~----------~----~----~----~------~----~------~--~---
