"Working with content objects" in the docs has examples of adding
content using Python interface.
http://kotti.readthedocs.org/en/latest/developing/developer-manual.html#working-with-content-objects
Here's an example:
>>> from kotti.resources import get_root
>>> from kotti.resources import Document
>>> root = get_root()
>>> root['first'] = Document(title=u'First page')
>>> root['second'] = Document(title=u'Second page')
>>> root['third'] = Document(title=u'Third page')
Document can be Comment or whatever content type you have. You can
see that the constructor takes keyword arguments for use as
attributes. So if you have a dict with the attributes, maybe that's
'comment' in your example, then you can do:
>>> cm = Comment(**comment_info)
Assign your new object to a parent to have it persisted in the content tree:
>>> mydoc['mycomment'] = cm
> --
> You received this message because you are subscribed to the Google Groups
> "Kotti" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to
kotti+un...@googlegroups.com.
> For more options, visit
https://groups.google.com/groups/opt_out.
>
>
--
http://danielnouri.org