I should add that this is not a closed issue.

Graham has a valid point and we need to find a way that makes
everybody happy.  I would like to hear an argument about why this does
not break backward compatibility (I think it does if people already
use routes for this purpose) and about what is wrong with using routes
for this.

Massimo

On Sep 5, 12:55 pm, mdipierro <mdipie...@cs.depaul.edu> wrote:
> I am not convinced. I had added this in trunk but I am taking it out
> because this is not the right solution to the problem and because it
> does break backward compatibility.
>
> 1) You can relocate web2py in a subfolder but you must use routes.py
> 2) The patch does break backward compatibility if a user is already
> using routes.py for this purpose
> 3) I do not like the fact that web2py treats input URLs differently
> than output URLs. If any url rewrite has to be made this should be
> done at the level of routes.py (the configuration for the rewrite.py
> module).
>
> It is very easy
>
> #in routes.py
> routes_out=(('(?P<anything>.*)','/yourpath\g<anything>'),)
>
> Massimo
>
> On Sep 5, 12:07 pm, Joe Barnhart <joe.barnh...@gmail.com> wrote:
>
> > +1 for Graham.
>
> > Backward compatibility is not broken because relocating the web2py site in
> > the directory structure is a new feature.  If you want to take advantage of
> > the new feature, you just re-code your URL functions.  Old installations
> > work as they always did.  (Also - can we call w2p "enterprise" if it doesn't
> > play nice with other WSGI apps?)
>
> > -- Joe B.
>
> > On Fri, Sep 4, 2009 at 2:59 AM, Graham Dumpleton <graham.dumple...@gmail.com
>
> > > wrote:
>
> > > On Sep 4, 4:26 pm, mdipierro <mdipie...@cs.depaul.edu> wrote:
> > > > I think we can modify your patch so that it does not require r=request
> > > > (which would break some apps)
>
> > > Why would requiting r=request for URL calls break some applications?
>
> > > The code for URL is:
>
> > >    application = controller = function = None
> > >    if r:
> > >        application = r.application
> > >        controller = r.controller
> > >        function = r.function
> > >    if a:
> > >        application = a
> > >    if c:
> > >        controller = c
> > >    if f:
> > >        if isinstance(f, str):
> > >            function = f
> > >        else:
> > >            function = f.__name__
>
> > >    if not (application and controller and function):
> > >        raise SyntaxError, 'not enough information to build the url'
>
> > > So supplying it where it wasn't previously shouldn't matter that I can
> > > see as previously for it to work the called would have had to provide
> > > a, c and f. If they are doing that they would still override what is
> > > specified by the request object.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web2py@googlegroups.com
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to