r13370 - in Products.Marshall/trunk: . Products/Marshall/namespaces
"David Glick" <[email protected]>
| Newsgroups | gmane.comp.web.zope.plone.archetypes.cvs |
|---|---|
| Message-ID | <[email protected]> |
Author: davisagli
Date: Mon Dec 20 00:49:22 2010
New Revision: 13370
Modified:
Products.Marshall/trunk/ (props changed)
Products.Marshall/trunk/CHANGES.txt
Products.Marshall/trunk/Products/Marshall/namespaces/atns.py
Products.Marshall/trunk/setup.py
Log:
merge PLIP 10778
Modified: Products.Marshall/trunk/CHANGES.txt
==============================================================================
--- Products.Marshall/trunk/CHANGES.txt (original)
+++ Products.Marshall/trunk/CHANGES.txt Mon Dec 20 00:49:22 2010
@@ -1,9 +1,11 @@
Changelog
=========
-2.0.1 - unreleased
-------------------
+2.1 - unreleased
+----------------
+- Use plone.uuid to look up content UUIDs.
+ [toutpt, davisagli]
2.0 - 2010-07-18
----------------
Modified: Products.Marshall/trunk/Products/Marshall/namespaces/atns.py
==============================================================================
--- Products.Marshall/trunk/Products/Marshall/namespaces/atns.py (original)
+++ Products.Marshall/trunk/Products/Marshall/namespaces/atns.py Mon Dec 20 00:49:22 2010
@@ -17,6 +17,7 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
##################################################################
+from plone.uuid.interfaces import IUUID
"""
Serialize AT Schema Attributes
@@ -246,7 +247,7 @@
class ArchetypeUID(SchemaAttribute):
def serialize(self, dom, parent_node, instance, options={}):
- value = getattr(instance, atcfg.UUID_ATTR, "")
+ value = IUUID(instance, '')
node = dom.createElementNS(Archetypes.xmlns, "uid")
nvalue = dom.createTextNode(value)
node.appendChild(nvalue)
@@ -261,7 +262,8 @@
def resolveUID(self, instance, values):
assert not isinstance(values, (list, tuple))
at_uid = values
- existing = getattr(instance, atcfg.UUID_ATTR, _marker)
+ #existing = getattr(instance, atcfg.UUID_ATTR, _marker)
+ existing = IUUID(instance, _marker)
if existing is _marker or existing != at_uid:
ref = Reference(uid=at_uid)
target = ref.resolve(instance)
Modified: Products.Marshall/trunk/setup.py
==============================================================================
--- Products.Marshall/trunk/setup.py (original)
+++ Products.Marshall/trunk/setup.py Mon Dec 20 00:49:22 2010
@@ -34,6 +34,7 @@
install_requires=[
'setuptools',
'transaction',
+ 'plone.uuid',
'zope.contenttype',
'zope.interface',
'Products.Archetypes',
------------------------------------------------------------------------------
Lotusphere 2011
Register now for Lotusphere 2011 and learn how
to connect the dots, take your collaborative environment
to the next level, and enter the era of Social Business.
http://p.sf.net/sfu/lotusphere-d2d