开发者

help with pylons routes url_for~

开发者 https://www.devze.com 2023-02-09 06:11 出处:网络
view-source:http://127.0.0.1:5000/admin/post/edit/2 : <form action=\"/admin/post/update_post/2\" method=\"post\">

view-source:http://127.0.0.1:5000/admin/post/edit/2 :

<form action="/admin/post/update_post/2" method="post">

view-source:http://xxx.com/admin/post/edit/2

<form action="/admin/post/edit/2/a开发者_运维技巧dmin/post/update_post/2" method="post">

something was diffent between server url code and localhost serve with the same code :

${form(url(controller='admin/post', action='update_post', id=request.urlvars['id']), method='post')}

both of them using pylons 1.0 and server online run with nginx~


I believe the url should start with a /. Also, you've specified a controller of 'admin/post' and I'm thinking that is probably supposed to be either or.

Give this a try

url('/admin/post/edit/' + request.urlvars['id'])
0

精彩评论

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