Commit 25ba47be authored by Jim Fulton's avatar Jim Fulton

Added needed absolute_url for Item_w__name__.

parent 67546662
...@@ -89,8 +89,8 @@ Aqueduct database adapters, etc. ...@@ -89,8 +89,8 @@ Aqueduct database adapters, etc.
This module can also be used as a simple template for implementing new This module can also be used as a simple template for implementing new
item types. item types.
$Id: SimpleItem.py,v 1.64 1999/10/21 14:09:24 jim Exp $''' $Id: SimpleItem.py,v 1.65 1999/10/21 15:35:56 jim Exp $'''
__version__='$Revision: 1.64 $'[11:-2] __version__='$Revision: 1.65 $'[11:-2]
import regex, sys, Globals, App.Management, Acquisition import regex, sys, Globals, App.Management, Acquisition
from webdav.Resource import Resource from webdav.Resource import Resource
...@@ -337,6 +337,16 @@ class Item_w__name__(Item): ...@@ -337,6 +337,16 @@ class Item_w__name__(Item):
def _setId(self, id): def _setId(self, id):
self.__name__=id self.__name__=id
def absolute_url(self, relative=0):
id=quote(self.__name__)
p=getattr(self,'aq_inner', None)
if p is not None:
url=p.aq_parent.absolute_url(relative)
if url: id=url+'/'+id
return id
def format_exception(etype,value,tb,limit=None): def format_exception(etype,value,tb,limit=None):
import traceback import traceback
result=['Traceback (innermost last):'] result=['Traceback (innermost last):']
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment