librelist archives

« back to archive

problem about url_for()

problem about url_for()

From:
Ranler Cao
Date:
2011-06-08 @ 12:30
Hi Everybody,

I have a problem with "url_for()" function.


for example:

file.html:
...
<a href="{{ url_for(notefile.route) }}" >a link</a>
...

file.py
...
@notefile.route('/file/comment'):
    ...
...



now i visit the url 'www.xxx.com/file' and get the file.html.
then i click 'a link'.

When i run this step with the development environment on my PC, it is all
OK. i jump to 'www.xxx.com/file/comment'.
But when i run it on VPS, i jump to
'www.xxx.com/file/file/comment'.Itappends '/file/comment' to '
www.xxx.com/file'.

how to fix this problem?
thanks.




-- 
--

Best Regards,
Ranler

--