routes_in = [
  ['/droughtmonitor/stations/$name', '/droughtmonitor/stations/show/$name'],
  ['/droughtmonitor/stations/$name/edit', 
'/droughtmonitor/stations/edit/$name'],
]
routes_out = [(y,x) for (x,y) in routes_in]

it worked!
care in the $node-$name difference as it wanted to be the same var 
$name-$name

thanks


On Monday, July 22, 2013 9:59:17 PM UTC+3, Massimo Di Pierro wrote:
>
> In routes.py
>
> routes_in = [
>   ['/app/nodes/$name', '/app/nodes/show/$node'],
>   ['/app/nodes/$name/edit', '/app/nodes/edit/$node'],
>   ['/app/nodes/$name/graph', '/app/nodes/graph/$node'],
> ]
> routes_out = [(y,x) for (x,y) in routes_in]
>
>
> On Monday, 22 July 2013 13:37:57 UTC-5, Antonis Konstantinos Tzorvas wrote:
>>
>> is there any way to get dynamic urls?
>>
>> for example i have
>>
>> ip.com/app/nodes/list (smartgrid)
>> ip.com/app/nodes/edit/[db.node.name]<http://ip.com/app/nodes/edit/%5Bdb.node.name%5D>
>> ip.com/app/nodes/show/[db.node.name]<http://ip.com/app/nodes/show/%5Bdb.node.name%5D>(details
>>  about each node)
>> ip.com/app/nodes/graph/[db.node.name]<http://ip.com/app/nodes/graph/%5Bdb.node.name%5D>
>>
>> and i am thinking on changing the url-scheme into something like this:
>>
>> ip.com/app/nodes/[db.node.name]<http://ip.com/app/nodes/%5Bdb.node.name%5D>(details
>>  about each node)
>> ip.com/app/nodes/[db.node.name]/edit<http://ip.com/app/nodes/%5Bdb.node.name%5D/edit>
>> ip.com/app/nodes/[db.node.name]/graph<http://ip.com/app/nodes/%5Bdb.node.name%5D/graph>
>>
>> any idea on how to achieve this?
>>
>

-- 

--- 
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 web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to