> > Parametric Router. I just read the book again and I had overlooked that > with the parametric router you cannot have app specific routes in the app > folder.
Actually, according to the example file, you can have app-specific routes in the app folder if desired: http://code.google.com/p/web2py/source/browse/router.example.py#6. This is not mentioned in the book. > I am suggesting the flow as follows: > 1. Look for root routes.py. > 2. See whether there are any apps specified which have their own routing. > The test for this is simply to look at the first arg of the URL after the > domain:port. The routes can already do that, can't they? > 3. If app specific routes apply, then go and get the app/routes.py and > follow that. > 4. If not, then follow the default routes. > Isn't this basically how it already works (for both systems)? I think the only catch is that if you do have app-specific routes in the application folder, you also have to have a routes.py in the root folder in order to indicate that (i.e., if there's no root routes.py, it won't attempt to do any rewriting). > @Anthony. As you say, the naming is not really an issue as long as > everything is clear and you suggest the documentation is pretty adequate -- > but evidently it is not. Here's what I said earlier: *Yes, I think the rewrite documentation could be improved, particularly with more examples for cases like this.* I agree the documentation can be improved. I wasn't claiming the documentation is generally adequate -- only that it does appear to adequately communicate the particular point you were making, namely, that the parameter-based system is simpler but has limitations and the pattern-based system more complex but more flexible. Anthony