Url for the current page from a Mako template in Pylons?

Not sure if this is the Pylons way of doing things but ${request. Url} seems to work for me.

Another very similar way would be to assign the request. Url to the context global, "c", in the controller's action and then use "c" in the view. – Juba Apr 30 '10 at 12:32.

I think you can use h. Url_for('', qualified=True) to get the full URL. Make sure you have imported url_for in your helper file: from routes.

Util import helpers as h Have a look at pylonshq.com/docs/en/0.9.7/thirdparty/ro....

Thanks for the idea...I tried it but I am actually using this in an iframe and your code gave the url for the iframe and not the containing page. Will update the question in that regard. – Jesse Vogt Apr 30 '10 at 2:49 Hmm, if it is an iframe, then it would not have any knowledge of the outer page URL.

The only way might be to use javascript to get the URL of the page, (using window. Location). – Glen Robertson Apr 30 '10 at 2:51 Yeah, the answer I posted seems to work.

I am going to leave the question open a little longer though to see if anyone else has an idea. Thanks again for helping! – Jesse Vogt Apr 30 '10 at 2:52.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions