2010-12-31 6 views
0

私はweb2pyを学んでいますが、このフレームワークにはとても満足していますが、いいURLを設定するのに問題があります。私は、変換したい:web2pyのURL書き換え時のリクエストが無効です

http://127.0.0.1:8000/computers/default/computer/this-is-a-test 

へ:

http://127.0.0.1:8000/computer/this-is-a-test 

私はroutes.pyでこれを入れているが、私は無効な要求を取得:

default_application = 'computers' 
default_controller = 'default' 
default_function = 'index' 

routes_in = (('/computer/$1', '/computers/default/computer/$1'),) 

routes_out = (('/computers/default/computer/$1', '/computer/$1'),) 

任意のアイデアを?私はいくつかの例題とドキュメントを探していますが、何も動作しません。私はweb2pyが大好きですが、これは私にとって不可欠です。

答えて

1

$ 1を$ aに変更してください。

これらは特別にweb2pyのリライトパーサーによって処理されますが、アルファでなければなりません。

私はautoroutesを使用