4teamwork / ftw.inflator

Plone site setup wizard with content creation and bundle system for predefined configurations.
3 stars 6 forks source link

Add transmogrifier config for creating single items. #21

Closed jone closed 8 years ago

jone commented 8 years ago

The inflator's transmogrifier config can be used in code for importing single items by using the single_item_content_creation configuration:

    item = {'_path': 'foo',
            '_type': 'Folder',
            'title': 'Foo'}

    mogrifier = Transmogrifier(portal)
    mogrifier(u'ftw.inflator.creation.single_item_content_creation',
              jsonsource=dict(item=item))