On Mar 16, 2012, at 6:58 PM, Anthony wrote:
> On Friday, March 16, 2012 9:46:33 PM UTC-4, Jonathan Lundell wrote:
> On Mar 16, 2012, at 6:39 PM, Anthony wrote:
>> I'm not sure, but I think if you have routes_app, it will ignore routes_in 
>> and routes_out in the root routes.py if the request is for one of the apps 
>> in routes_app. If you're using routes_app, then you also need routes.py 
>> files within the specific application folders as well.
> 
> Offhand, I don't think so. Or at least if it's true, it's not intentional.
> 
> routes_app is there for app-specific routing because the router has to know 
> which app is being referenced in order to find an app-specific routes.py. But 
> it *should* default to the global routes.py for any app that doesn't have one.
> 
> Yes, that's what I'm saying (I think) -- if the request matches one of the 
> routes in routes_app, it will only use the routes specified in the 
> app-specific routes.py and it will ignore the routes_in and routes_out 
> specified in the root /web2py/routes.py file, right? If I'm reading his 
> routes_app correctly, it always matches an app-specific route, so will never 
> use the base routes_in and routes_out.
> 

You're probably right, though I think it'd be better behavior to use the global 
routes if the app-specific routes.py doesn't exist. That's what the parametric 
router does.

Reply via email to