Visit foo/absolute_url and you will find that it "has an empty or missing docstring". Is this by design, or is it just something that nobody has needed? I would like to propose making it callable TTW, unless somebody knows a reason it should not be. I could make use of it in two ways: 1) every now and then I forget that it doesn't work, and I type stuff like http://my_zope_site/foo/bar/baz/absolute_url when I'm not sure if baz is being acquired from foo, from bar, or the site root (or maybe even a CMF skin) and I want to find out quickly. 2) (kind of esoteric) It would be nice to be able to easily get "normalized" URLs from zope objects into non-zope systems that link to Zope content. e.g. today I wished I could tell a JSP developer at my company to use something like <a href="<%= stupidHttpClient('http://zope_server/foo/bar/absolute_url') %>"> (... and yes, we do have something like a stupidHttpClient.) - Paul Winkler http://www.slinkp.com Look! Up in the sky! It's HIGHLY TOXIC PIRATE! (random hero from isometric.spaceninja.com)
Paul Winkler wrote:
Visit foo/absolute_url and you will find that it "has an empty or missing docstring". Is this by design, or is it just something that nobody has needed? I would like to propose making it callable TTW, unless somebody knows a reason it should not be.
I don't know whether absolute_url should be accessible via URL, but here's a way to get the same thing (almost): add a script at the root of your site called "AbsoluteURL", with the body "return context.absolute_url()". Then just use "http://example.com/foo/bar/AbsoluteURL" instead of "http://example.com/foo/bar/absolute_url". Shane
On Wed, Feb 05, 2003 at 05:08:35PM -0500, Shane Hathaway wrote:
I don't know whether absolute_url should be accessible via URL, but here's a way to get the same thing (almost): add a script at the root of your site called "AbsoluteURL", with the body "return context.absolute_url()". Then just use "http://example.com/foo/bar/AbsoluteURL" instead of "http://example.com/foo/bar/absolute_url".
sure, I can do that... i'm just surprised it's not on by default. Here's another argument: Image.tag is callable via URL. absolute_url is not. Inconsistency is confusing, especially to newbies. if I had the time, I'd go through the API Reference and catalog methods that are callable by URL and methods that are not, and try to make some sense of it. I suspect it would be pretty random ;-) For now, I think I will file a feature request & patch in the collector. -- Paul Winkler http://www.slinkp.com Look! Up in the sky! It's OCTO FLAGELLA FIGHTER! (random hero from isometric.spaceninja.com)
participants (2)
-
Paul Winkler -
Shane Hathaway