On Tuesday, November 29, 2011 8:36:22 PM UTC-5, Constantine Vasil wrote:
>
> OK here is my setup:
>
> routes.py:
> ===============================================
> routers = dict(
>     BASE = dict(
>         default_application = 'myapp',
>         default_controller='default'
>     ),
> )
>
> routes_in = (
>               ('/myinfo', '/default/myinfo'),
>                    )
>
> routes_out = (
>               ('/default/myinfo', '/myinfo'),    
>                       )
>

Note, you cannot mix parameter and pattern based rewrite systems -- either 
use router or routes_in/routes_out, but not both. 

 

> ===============================================
>
> index.html:
> ===============================================
> <a href={{=URL('default', args='myinfo')}}  data-role="button" 
>  data-theme="d" data-inline="true" data-icon="info">View</a>
> ===============================================
> the link renders as:
> /default/default/myinfo
>

If you only pass one un-named argument to URL(), it assumes it is the name 
of the function, and it sets the app and controller to be the current app 
and controller (i.e., for the current request). So, it assumes you want a 
function called 'default' in the 'default' controller.
 

>
> index.html:
> ===============================================
> <a href={{=URL(args='myinfo')}}  data-role="button"  data-theme="d" 
> data-inline="true" data-icon="info">View</a>
> ===============================================
> the link renders as:
> /index/myinfo
>

Same problem here -- with no un-named arguments, it assumes you want the 
current app, controller, and function (since this is the index page, 
'index' is the current function.

Anthony

Reply via email to