On Tuesday, March 22, 2011 2:27:52 PM UTC-4, Keith Pettit wrote: 
>
> That worked.  Thank you for the help.   
>
> Just a note, in my default install of web2py there was a  
> router.example.py -AND-
> routes.example.py
>
> In the examples there router.example.py had exactly what you suggested so 
> I tried that and renamed it to router.py which didn't work.  I created a new 
> file like you suggested called routes.py which did work.  It's kind of 
> confusing with the two examples that don't quite work so I thought I'd 
> mention it.
>
 
Yes, that is confusing. There are two separate routing systems, as described 
here: http://web2py.com/book/default/chapter/04#URL-Rewrite. You have to use 
one or the other -- you can't mix them. 'routes.example.py' includes 
examples of the older pattern-based system, and 'router.example.py' contains 
examples of the newer parameter-based system. You would think renaming 
'router.example.py' to 'router.py' would be the thing to do, but in fact, 
regardless of which system you use, you have to rename the file to 
'routes.py' (otherwise, if both files existed, web2py wouldn't know which 
one to use). For clarity, we should probably change the names of the two 
example files to something like 'routes.pattern_example.py' and 
'routes.parameter_example.py' -- that will make it more clear what is in 
each and that both need to be renamed to 'routes.py'.
 
Anthony

Reply via email to