[ZCM] [ZC] 797/ 1 Request "absolute_url not callable by URL"
Collector: Zope Bugs, Features, and Patches ...
zope-coders-admin@zope.org
Wed, 05 Feb 2003 18:48:13 -0500
Issue #797 Update (Request) "absolute_url not callable by URL"
Status Pending, Zope/feature+solution low
To followup, visit:
http://collector.zope.org/Zope/797
==============================================================
= Request - Entry #1 by slinkp on Feb 5, 2003 6:48 pm
absolute_url has no docstring and thus may not be called just by visiting http://zope:8080/foo/absolute_url.
Several points:
* It is often desirable during developement - "where is this thing really? let me check real quick."
* Other zope API methods of similar utility
(e.g. Image.tag) are callable by URL. So this is inconsistent.
* App.absolute_url IS callable by URL. So it's REALLY inconsistent :)
* Why not?
Following is a context diff that adds a docstring.
Apply this to lib/python/OFS/Traversable.py
*** Traversable.py Wed Feb 5 18:27:31 2003
--- Traversable1.py Wed Feb 5 18:35:41 2003
***************
*** 29,34 ****
--- 29,40 ----
absolute_url__roles__=None # Public
def absolute_url(self, relative=0):
+ """Return an absolute URL to the object,
+ based on the physical containment path.
+ If the optional relative argument is true,
+ return the physical path from the (possibly
+ virtual) root."""
+
try:
req = self.REQUEST
except AttributeError:
==============================================================