Oooooopppps. Sorry, sorry, sorry. My bad. My router rules had an slash too 
many. Here are the correct ones:

    routes_in = (
        ('/admin(?P<any>.*)',   '/admin\g<any>'),
        ('/app1(?P<any>.*)',    '/app1\g<any>'),
        ('/(?P<any>.*)',        '/app2/\g<any>'),
    )
    routes_out = (
        ('/admin(?P<any>.*)',  '\g<any>'),
        ('/app1(?P<any>.*)',   '\g<any>'),
        ('/app2/(?P<any>.*)',  '/\g<any>'),
    )

And that works. Sorry again.

On Thursday, May 30, 2013 8:12:26 PM UTC+2, Daniel Gonzalez wrote:
>
> Hi,
>
> I have a strange use case, which is maybe not covered by the router / URL 
> implementation.
>
> I have just started using a second application, and I have modified my 
> routes.py:
>
>     routes_in = (
>         ('/admin(?P<any>.*)',   '/admin\g<any>'),
>         ('/app1(?P<any>.*)',    '/app1\g<any>'),
>         ('/(?P<any>.*)',        '/app2/\g<any>'),
>     )
>     routes_out = (
>         ('/admin(?P<any>.*)',  '/\g<any>'),
>         ('/app1(?P<any>.*)',   '/\g<any>'),
>         ('/app2/(?P<any>.*)',  '/\g<any>'),
>     )
>
> (app2 is my default app, which should be accessible at the root of the url)
>
> In my app1 I am doing something like this:
>
> URL('static','images/image01.png')
>
> And I was expecting a url like: /app1/static/images/image01.png
>
> Instead, I am getting: //static/images/image01.png
>
> So the application part is skipped. Is this normal? Can I solve this 
> problem somehow?
>
> Thanks,
> Daniel
>

-- 

--- 
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 web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to