Example #1
0
 def _make_doc(self, doc_id, parent=None):
     from petrel.content.document import Document
     doc = Document()
     doc.title = doc_id
     if parent is None:
         parent = self.site
     parent.add(doc_id, doc)
     return doc
Example #2
0
 def _make_document(self, parent=None):
     from petrel.content.document import Document
     doc = Document()
     doc.title = u'Foo'
     doc.description = u'bar'
     doc.body = u'baz'
     if parent is None:
         parent = self.site
     parent.add(self.config.registry, 'doc', doc)
     return doc
Example #3
0
 def _make_document(self, parent, name):
     from petrel.content.document import Document
     document = Document()
     document.id = name
     parent.add(self.config.registry, name, document)
     return document