url_for appending query string in Pylons
in routes.py:
map.connect("/panel/transaction/list/{count}/",controller='transaction',action='list' , count=0)
map.connect('/panel/tran开发者_运维问答saction/tcard/{key}/{transaction_id}/',controller='transaction',action='tcard' , key='a',transaction_id=0)
When i open url like this /panel/transaction/tcard/a/12/
then h.url_for(controller='transaction',action='list',count=0) returning url with query_string form parent map: /panel/transaction/list/0/?key=a&transaction_id=12
For what reason h.url_for create url with query_string on the end?
Thanks for the help.
You're experiencing the Route Memory feature of Routes.
http://pylonsbook.com/en/1.1/urls-routing-and-dispatch.html#route-memory
精彩评论