Re: [web2py] Re: Proposal - use the value of an environment variable as a path_prefix

2013-12-21 Thread Rob Mayhue
I just want to update this thread. I liked Jonathan's idea about making path_prefix accept a regex but in trying to implement that idea I decided on a slightly different solution. The new solution adds `prefix_match` as a new router param. routers = dict( ... BASE=dict( ...

Re: [web2py] Re: Proposal - use the value of an environment variable as a path_prefix

2013-12-14 Thread Rob Mayhue
I like this idea better. It took me a little while to figure out exactly what was going on in rewrite.py to even arrive at my current solution, but I can see that what you suggest would be a better solution as well as easier to use. I chose the env var because I knew could easily get to the va

Re: [web2py] Re: Proposal - use the value of an environment variable as a path_prefix

2013-12-14 Thread Jonathan Lundell
On 14 Dec 2013, at 2:23 PM, Massimo Di Pierro wrote: > Please open a ticket about this proposal. I wonder if a more general solution might not be to have the router accept a regex for path_prefix, strip it from the incoming URL, and save it (say) as request.path_prefix. The outgoing URL rewrit

[web2py] Re: Proposal - use the value of an environment variable as a path_prefix

2013-12-14 Thread Massimo Di Pierro
Please open a ticket about this proposal. On Saturday, 14 December 2013 15:07:02 UTC-6, Rob Mayhue wrote: > > Proposal - use the value of an environment variable as a path_prefix > > When using the parametric router there is an option called `path_prefix` > that's > described as "a path fragment