[Checkins] SVN: z3c.relationfieldui/branches/faassen-relationlist/ Do not use IRelationInfo anymore.

Martijn Faassen faassen at infrae.com
Tue Dec 16 14:07:25 EST 2008


Log message for revision 94130:
  Do not use IRelationInfo anymore.
  

Changed:
  U   z3c.relationfieldui/branches/faassen-relationlist/CHANGES.txt
  U   z3c.relationfieldui/branches/faassen-relationlist/src/z3c/relationfieldui/widget.py

-=-
Modified: z3c.relationfieldui/branches/faassen-relationlist/CHANGES.txt
===================================================================
--- z3c.relationfieldui/branches/faassen-relationlist/CHANGES.txt	2008-12-16 19:01:58 UTC (rev 94129)
+++ z3c.relationfieldui/branches/faassen-relationlist/CHANGES.txt	2008-12-16 19:07:25 UTC (rev 94130)
@@ -8,6 +8,9 @@
   using ``setAttribute('value', ...)``. The latter did not update
   dynamically updated input fields, and the former does.
 
+* ``z3c.relationfield`` does not use ``IRelationInfo`` anymore and
+  instead exposes ``create_relation``. Use this instead.
+
 0.1.1 (2008-12-10)
 ==================
 

Modified: z3c.relationfieldui/branches/faassen-relationlist/src/z3c/relationfieldui/widget.py
===================================================================
--- z3c.relationfieldui/branches/faassen-relationlist/src/z3c/relationfieldui/widget.py	2008-12-16 19:01:58 UTC (rev 94129)
+++ z3c.relationfieldui/branches/faassen-relationlist/src/z3c/relationfieldui/widget.py	2008-12-16 19:07:25 UTC (rev 94130)
@@ -14,7 +14,7 @@
 from hurry.js.wforms import wforms
 
 from z3c.relationfield.schema import IRelation, IRelationList
-from z3c.relationfield.interfaces import IRelationInfo
+from z3c.relationfield import create_relation
 
 relation_lib = Library('z3c.relationfieldui')
 relation_resource = ResourceInclusion(relation_lib, 'relation.js')
@@ -41,7 +41,7 @@
         # convert path to Relation object
         obj = self.resolve(input)
         # XXX if obj is none, cannot create path
-        return IRelationInfo(obj).createRelation()
+        return create_relation(obj)
 
     def _toFormValue(self, value):
         if value is None:
@@ -128,7 +128,7 @@
         resolve = object_path.resolve
         for path in paths:
             obj = resolve(path)
-            result.append(IRelationInfo(obj).createRelation())
+            result.append(create_relation(obj))
         return result
         
     def _toFormValue(self, value):



More information about the Checkins mailing list