help with pylons routes url_for~

321 views Asked by At

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/admin/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~

1

There are 1 answers

1
Rick On BEST ANSWER

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'])