[Zope-Checkins] CVS: Zope/lib/python/OFS - SimpleItem.py:1.108.4.1

Stuart Bishop zen at shangri-la.dropbear.id.au
Sat Dec 13 01:07:11 EST 2003


Update of /cvs-repository/Zope/lib/python/OFS
In directory cvs.zope.org:/tmp/cvs-serv3046/lib/python/OFS

Modified Files:
      Tag: zen-fix__name__-branch
	SimpleItem.py 
Log Message:
Added getId() to Item_w__name__, since the one inherited from Item
has broken __name__ handling.

PageTemplateFile now using Item_w__name__ mixin, making getId()
and absolute_url() actually work.


=== Zope/lib/python/OFS/SimpleItem.py 1.108 => 1.108.4.1 ===
--- Zope/lib/python/OFS/SimpleItem.py:1.108	Fri Nov 28 11:45:42 2003
+++ Zope/lib/python/OFS/SimpleItem.py	Sat Dec 13 01:06:40 2003
@@ -313,6 +313,10 @@
 class Item_w__name__(Item):
     """Mixin class to support common name/id functions"""
 
+    def getId(self):
+        """Returns the id"""
+        return self.__name__
+
     def title_or_id(self):
         """Utility that returns the title if it is not blank and the id
         otherwise."""




More information about the Zope-Checkins mailing list