On Jul 10, 5:02 pm, Forest Bond <[EMAIL PROTECTED]> wrote:
> On Tue, Jul 10, 2007 at 04:25:17PM -0400, Marty Alchin wrote:
>
> > On 7/10/07, Forest Bond <[EMAIL PROTECTED]> wrote:
> > > All of this could be fixed by simply changing ModPythonRequest
> > > (django/core/handlers/modpython.py) to use req.path_info instead of
> > > req.uri.
> > > Is there any reason not to do that (aside from breaking backwards
> > > compatibility)?
>
> > I'm certainly no expert in this area, but keep in mind that mod_python
> > is just one available option for deploying Django. There would have to
> > be some equivalent in the other situations, such as FastCGI, in order
> > for this to be taken seriously.
>
> Is this kind of change relevant for all of the other methods? I have not used
> any of the others. Certainly, if a change like this is made, the other
> handlers
> would need to be updated for consistency. I agree with you there.
>
> If there was some way to tell apache/mod_python to pass the URL sans the
> prefix
> in to django, I would simply do that. I have not been able to find any such
> thing.
>
> But really, the prefix is a deployment detail that I should be able to make my
> application agnostic to. I don't have to include my domain name in my
> urls.py,
> why should I have to include a prefix?
>
> Maybe this behavior could be determined by something in settings.py.
>
> -Forest
>
> signature.asc
> 1KDownload
Your applications should be root url agnostic. Each app should have
its own urls.py and the root site urls.py (and its accompanying
settings.py) should have the site specific information including the
root. Then the apps are included in the site specific root urls.py
You might want to check out this thread for more information:
http://groups.google.com/group/django-developers/browse_thread/thread/e9d92bceab679f6a/#
Here is an example of having the root urls.py get its bases from
settings.py (though not a very good one):
https://svn.python.org/conference/django/trunk/pycon/urls.py
Hope that helps!
-Doug
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---