On 1 Mar 2013, at 6:42 AM, jjg0 <[email protected]> wrote:
> I saw in another question someone posted an example using the parameter based 
> system:
> 
> 
> routers = dict(
> 
>     # base router
>     BASE=dict(
>         default_application='myapp',
>     ),
> 
>     myapp=dict(
>         default_controller='default',
>         default_function='index',
>         functions=['index', 'contactus'],
>     ),
> ) 
> 
> where I guess you have to type in every function in the default controller? 

Only if you want to omit function names at the same time you have args 
following the function. Otherwise, no need. To accomplish what you're after, 
all you need (because default/index is already the deafult) is:

routers = dict(

    # base router
    BASE=dict(
        default_application='myapp',
    ),
) 

> This still doesn't solve my problem.  Using these settings does the same 
> thing where going to 127.0.0.1:8000 will take you to 
> 127.0.0.1:8000/myapp/default/index, but trying any other page like 
> 127.0.0.1:8000/contactus does not work. 

It should. Be sure to restart your server/web2py after editing routes.py, 
though.

> I still need to use 127.0.0.1:8000/myapp/default/<function> for any 
> additional pages I add.


-- 

--- 
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/groups/opt_out.


Reply via email to