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

Stuart Bishop zen at shangri-la.dropbear.id.au
Sat Dec 13 02:58:20 EST 2003


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

Modified Files:
	SimpleItem.py 
Log Message:
Merging to HEAD

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.109 ===
--- Zope/lib/python/OFS/SimpleItem.py:1.108	Fri Nov 28 11:45:42 2003
+++ Zope/lib/python/OFS/SimpleItem.py	Sat Dec 13 02:57:49 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