5 Jan 2008 11:20
String Representation of keys
Hi, first it´s hard for me to explain what i need. So i hope you can understand my problems. I try to develope a "storm container" for zope. I use the zalchemy product as a base for my work with storm. I run into some Problems when i try to build a uri for my objects. An example: http://localhost/app/Person-(1,) In uri consists of these relevant parts for me: app is the container Person is the classname of my Object (1,) these are the primary keys of my object Currently i construct the primary key in this way: def _toStringIdentifier(self, obj): """ Construct the PrimaryKey""" store = getUtility(IZStorm).get(self.getStoreUtilityName()) ident = self._getInstanceKey(obj) prefix = "%s-" %self._class.__name__ return "%s%s" %(prefix, ident) def _getInstanceKey(self, obj):(Continue reading)
RSS Feed