Is there way to programmatically set a path prefix in a controller rather
than in routes.py?
Best,
Michael Joseph Gheith
On Tuesday, July 29, 2014 4:47:17 PM UTC-5, Michael Gheith wrote:
>
> Hello,
>
> I rewrote what you had Massimo as the following (and it compiled just
> fine):
>
> routes_in = [('/sam/(?P<client>\w+)/$a/$c/$f', '/$a/$c/$f/\g<client>')]
>
> routes_out = [('/$a/$c/$f/(?P<client>)', '/sam/\g<client>/$a/$c/$f')]
>
>
> I see what you are trying to do - although it's still not producing the
> desired result unfortunately :(
>
>
> Further guidance would be much appreciated! Anthony, where are you on
> this one, I need your help man!
>
>
>
> Kindest of regards,
>
> Michael Joseph Gheith
>
> On Wednesday, July 23, 2014 11:41:29 AM UTC-5, Michael Gheith wrote:
>>
>> What I'm trying to do is to have my application serve 2 different
>> customers via URLs like the following:
>>
>> http://127.0.0.1:8000/sam/client1/<appname>/default/index
>> http://127.0.0.1:8000/sam/client2/<appname>/default/index
>>
>>
>> My routes.py looks like:
>>
>> routes_in = (
>>
>> ('/sam/client1/$a/$c/$f', '/$a/$c/$f'), (
>> '/sam/client2/$a/$c/$f', '/$a/$c/$f')
>>
>> )
>>
>>
>> routes_out = (
>>
>> ('/$a/$c/$f', '/sam/client1/$a/$c/$f'), ('/$a/$c/$f',
>> '/sam/client2/$a/$c/$f')
>>
>> )
>>
>>
>> This works great for client1. The minute I use client2 the links use
>> client1 mappings in the URL. I'm using the URL function for all my links.
>> Any ideas what I'm doing wrong? Perhaps this is an issue with web2py?
>> Please advise.
>>
>>
>> Thanks in advance!
>> M.G.
>>
>
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
---
You received this message because you are subscribed to the Google Groups
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.