Index: /quintagroup.transmogrifier/trunk/quintagroup/transmogrifier/configure.zcml
===================================================================
--- /quintagroup.transmogrifier/trunk/quintagroup/transmogrifier/configure.zcml	(revision 1563)
+++ /quintagroup.transmogrifier/trunk/quintagroup/transmogrifier/configure.zcml	(revision 1564)
@@ -135,4 +135,6 @@
         name="quintagroup.transmogrifier.portletsimporter"
         />
+
+    <adapter factory=".portlets.PortletAssignmentExportImportHandler" />
 
     <transmogrifier:registerConfig
Index: /quintagroup.transmogrifier/trunk/quintagroup/transmogrifier/portlets.py
===================================================================
--- /quintagroup.transmogrifier/trunk/quintagroup/transmogrifier/portlets.py	(revision 1563)
+++ /quintagroup.transmogrifier/trunk/quintagroup/transmogrifier/portlets.py	(revision 1564)
@@ -2,11 +2,16 @@
 
 from zope.interface import classProvides, implements, providedBy
-from zope.component import getUtilitiesFor, queryMultiAdapter
+from zope.component import getUtilitiesFor, queryMultiAdapter, getUtility, \
+    getMultiAdapter, adapts
+from zope.component.interfaces import IFactory
+from zope.app.container.interfaces import INameChooser
 
 from plone.portlets.interfaces import ILocalPortletAssignable, IPortletManager,\
-    IPortletAssignmentMapping
+    IPortletAssignmentMapping, IPortletAssignment
 from plone.portlets.constants import CONTEXT_CATEGORY
 from plone.app.portlets.interfaces import IPortletTypeInterface
 from plone.app.portlets.exportimport.interfaces import IPortletAssignmentExportImportHandler
+from plone.app.portlets.exportimport.portlets import PropertyPortletAssignmentExportImportHandler
+from plone.app.portlets.interfaces import IPortletTypeInterface
 
 from collective.transmogrifier.interfaces import ISection, ISectionBlueprint
@@ -120,14 +125,62 @@
                 yield item; continue
 
-            #if ILocalPortletAssignable.providedBy(obj):
-                #data = None
-                #data = item[fileskey]['portlets']['data']
-                #doc = minidom.parseString(data)
-                #root = doc.documentElement
-                #children = [k for k in root.childNodes]
-                #for child in children:
-                    #if child.nodeName != 'assignment':
-                        #continue
-                    #self.importPortlet(child)
+            if ILocalPortletAssignable.providedBy(obj):
+                data = None
+                data = item[fileskey]['portlets']['data']
+                doc = minidom.parseString(data)
+                root = doc.documentElement
+                for elem in root.childNodes:
+                    if elem.nodeName == 'assignment':
+                        self.importAssignment(obj, elem)
+                    #elif elem.nodeName == 'blacklist':
+                        #self.importBlacklist(obj, elem)
 
             yield item
+
+    def importAssignment(self, obj, node):
+        """ Import an assignment from a node
+        """
+        # 1. Determine the assignment mapping and the name
+        manager_name = node.getAttribute('manager')
+        category = node.getAttribute('category')
+
+        manager = getUtility(IPortletManager, manager_name)
+        mapping = getMultiAdapter((obj, manager), IPortletAssignmentMapping)
+
+        # 2. Either find or create the assignment
+        assignment = None
+        name = node.getAttribute('name')
+        if name:
+            assignment = mapping.get(name, None)
+
+        type_ = node.getAttribute('type')
+
+        if assignment is None:
+            portlet_factory = getUtility(IFactory, name=type_)
+            assignment = portlet_factory()
+
+            if not name:
+                chooser = INameChooser(mapping)
+                name = chooser.chooseName(None, assignment)
+
+            mapping[name] = assignment
+
+        # aq-wrap it so that complex fields will work
+        assignment = assignment.__of__(obj)
+
+        # 3. Use an adapter to update the portlet settings
+        portlet_interface = getUtility(IPortletTypeInterface, name=type_)
+        assignment_handler = IPortletAssignmentExportImportHandler(assignment)
+        assignment_handler.import_assignment(portlet_interface, node)
+
+class PortletAssignmentExportImportHandler(PropertyPortletAssignmentExportImportHandler):
+    """ This adapter is needed because original fails to handle text from 
+        pretty printed XML file.
+    """
+    adapts(IPortletAssignment)
+
+    def extract_text(self, node):
+        text = super(PortletAssignmentExportImportHandler, self).extract_text(node)
+        # strip text to remove newlines and space character from the beginning 
+        # and the end
+        return text.strip()
Index: /quintagroup.transmogrifier/trunk/quintagroup/transmogrifier/portlets.txt
===================================================================
--- /quintagroup.transmogrifier/trunk/quintagroup/transmogrifier/portlets.txt	(revision 1563)
+++ /quintagroup.transmogrifier/trunk/quintagroup/transmogrifier/portlets.txt	(revision 1564)
@@ -44,4 +44,5 @@
 ... [portletsimporter]
 ... blueprint = quintagroup.transmogrifier.portletsimporter
+... files-key = files
 ... """
 >>> registerConfig(u'quintagroup.transmogrifier.tests.portlets', portlets)
@@ -71,4 +72,15 @@
 </portlets>
 <BLANKLINE>
->>> pprint.pprint(plone.updated)
-()
+{'_path': 'other-assignable',
+ 'files': {'portlets': {'data': ...
+                        'name': '.portlets.xml'}}}
+>>> 'habra-rss' in mapping
+True
+>>> mapping['habra-rss'].count
+20
+>>> mapping['habra-rss'].url
+u'http://habrahabr.ru/rss/'
+>>> mapping['habra-rss'].portlet_title
+u'Habrahabr RSS feed'
+>>> mapping['habra-rss'].timeout
+120
Index: /quintagroup.transmogrifier/trunk/quintagroup/transmogrifier/tests.py
===================================================================
--- /quintagroup.transmogrifier/trunk/quintagroup/transmogrifier/tests.py	(revision 1563)
+++ /quintagroup.transmogrifier/trunk/quintagroup/transmogrifier/tests.py	(revision 1564)
@@ -1055,8 +1055,4 @@
             return [''] + self._last_path.split('/')
 
-        updated = ()
-        def _updateProperty(self, id, value):
-            self.updated += ((self._last_path, id, value))
-
     portal = MockPortal()
     test.globs['plone'] = portal
@@ -1074,4 +1070,27 @@
                 dict(_path='spam/eggs/notassignable'),
                 dict(_path='assignable'),
+                dict(_path='other-assignable', 
+                    files=dict(portlets=dict(
+                        name='.portlets.xml',
+                        data="""<?xml version="1.0" encoding="utf-8"?>
+<portlets>
+  <assignment category="context" key="/other-assignable" manager="plone.leftcolumn" name="habra-rss" type="portlets.rss">
+    <property name="count">
+      20
+    </property>
+    <property name="url">
+      http://habrahabr.ru/rss/
+    </property>
+    <property name="portlet_title">
+      Habrahabr RSS feed
+    </property>
+    <property name="timeout">
+      120
+    </property>
+  </assignment>
+</portlets>
+""")
+                    )
+                )
             )
 
@@ -1100,4 +1119,5 @@
     provideAdapter(localPortletAssignmentMappingAdapter)
     mapping = getMultiAdapter((portal, manager), IPortletAssignmentMapping)
+    test.globs['mapping'] = mapping
 
     # register portlet (this is what plone:portlet zcml directive does)
@@ -1133,8 +1153,4 @@
         field.set(assignment, v)
 
-    # register adapter for portlet assignment export/import
-    from plone.app.portlets.exportimport.portlets import PropertyPortletAssignmentExportImportHandler
-    provideAdapter(PropertyPortletAssignmentExportImportHandler)
-
 def test_suite():
     import sys
