[CMF-checkins] CVS: CMF/CMFWorkspaces - OrganizationTool.py:1.4 References.py:1.4
Shane Hathaway
shane@cvs.zope.org
Mon, 17 Jun 2002 16:25:17 -0400
Update of /cvs-repository/CMF/CMFWorkspaces
In directory cvs.zope.org:/tmp/cvs-serv22647
Modified Files:
OrganizationTool.py References.py
Log Message:
- Minor formatting cleanup.
- Use items instead of attributes of records, making it easier for scripts
to call setLocationInfo() directly.
=== CMF/CMFWorkspaces/OrganizationTool.py 1.3 => 1.4 ===
def listAddableTypes(self):
"""Returns a list of types."""
- return self._types.keys()
+ res = self._types.keys()
+ res.sort()
+ return res
security.declarePublic('getAddFormURL')
@@ -119,9 +121,9 @@
"""
types = {}
for r in info:
- t = str(r.type)
+ t = str(r['type'])
if t:
- types[t] = (str(r.location), str(r.skin_name))
+ types[t] = (str(r['location']), str(r['skin_name']))
self._types = types
if RESPONSE is not None:
RESPONSE.redirect(self.absolute_url() + '/manage_placement?' +
=== CMF/CMFWorkspaces/References.py 1.3 => 1.4 ===
def __repr__(self):
- return '<%s, path=%s>' % (self.__class__.__name__, self._path)
+ return '<%s, path=%s>' % (self.__class__.__name__,
+ '/'.join(self._path))
def __cmp__(self, other):
"""Compares this object with another.