Пример #1
0
 def make_document(self, root):
     from kotti.resources import Document
     doc = root['doc'] = Document()
     from kotti import DBSession
     DBSession.flush()
     DBSession.refresh(doc)
     return doc
Пример #2
0
 def make_document(self, root):
     from kotti.resources import Document
     doc = root['doc'] = Document()
     from kotti import DBSession
     DBSession.flush()
     DBSession.refresh(doc)
     return doc
Пример #3
0
    def make_document(self, root):
        from kotti import DBSession
        from kotti.resources import Document

        content = root['doc'] = Document(title=u'MyDocument')
        DBSession.flush()
        DBSession.refresh(content)
        return content
Пример #4
0
    def make_document(self):
        from kotti import DBSession
        from kotti.resources import Document

        content = self.root['document'] = Document()
        DBSession.flush()
        DBSession.refresh(content)
        return content
Пример #5
0
    def make_document(self, root):
        from kotti import DBSession
        from kotti.resources import Document

        content = root["document"] = Document()
        DBSession.flush()
        DBSession.refresh(content)
        return content
Пример #6
0
    def make_document(root):
        from kotti import DBSession
        from kotti.resources import Document

        content = root["document"] = Document()
        DBSession.flush()
        DBSession.refresh(content)
        return content
Пример #7
0
    def make_document(self, root):
        from kotti import DBSession
        from kotti.resources import Document

        content = root['doc'] = Document(title=u'MyDocument')
        DBSession.flush()
        DBSession.refresh(content)
        return content
Пример #8
0
    def test_change_workflow_extended_content(self, root, workflow, browser):
        from zope import interface
        from kotti import DBSession
        from kotti.interfaces import IDefaultWorkflow
        from kotti.resources import Content
        from kotti.testing import BASE_URL

        content = root["content"] = Content()
        assert content.state == None

        interface.directlyProvides(content, IDefaultWorkflow)
        DBSession.flush()
        DBSession.refresh(content)
        browser.open(BASE_URL + "/contents")
        assert content.state == u"private"
        browser.getLink("Make Public").click()
        assert content.state == u"public"