开发者

Pylons - url.current() incorrect, for '/test' shows '/test/test'?

开发者 https://www.devze.com 2023-01-18 05:07 出处:网络
I\'ve got a pylons setup, using flup with nginx, and url.current() always returns totally wrong. I have a route:

I've got a pylons setup, using flup with nginx, and url.current() always returns totally wrong.

I have a route:

map.connect('testpage', '/test', controller='Main', action='test')

And in that controller, I do url.current() and I get /test/test' instead of '/test'. I've t开发者_如何学Cried changingSCRIPT_NAME` as various posts about using uwsgi suggest, but it makes no difference here.

Any suggestions?


Actually it looks like I solved this. Apparently you have to set SCRIPT_NAME to '' AND restart the Pylons application, which I apparently hadn't tried before.

So if anyone else has this problem - restart Pylons :)


in nginx i do

#fastcgi_param SCRIPT_NAME $fastcgi_script_name;

0

精彩评论

暂无评论...
验证码 换一张
取 消