예제 #1
0
def activate_wicked(portal, out):
    """
    Turn on wicked's wiki linking.
    """
    # we don't use Plone's allowable types infrastructure, so we
    # just set any type to turn on the wiki linking
    markup_ctrl = IMarkupSchema(portal, None)
    if markup_ctrl is None:
        setSite(portal) # <-- req'd when called via 'zopectl run'
        markup_ctrl = IMarkupSchema(portal)
    if not markup_ctrl.wiki_enabled_types:
        print >> out, "Activating wicked linking"
        markup_ctrl.wiki_enabled_types = ['Page']
예제 #2
0
    def afterSetUp(self):
        PHCTestCase.PHCTestCase.afterSetUp(self)

        # In the Markup Control Panel, choose more than one text
        # format from the "Alternative Formats" choices
        markup_data = IMarkupSchema(self.portal)
        markup_data.allowed_types = ('text/html', 'text/plain',
                                     'text/restructured')

        self._createFAQ(self.folder.hc.faq, 'f')
        self.faq = self.folder.hc.faq.f
        self._createHowto(getattr(self.folder.hc, 'how-to'), 'howto1')
        self.howto = getattr(self.folder.hc, 'how-to').howto1
        self._createTutorial(self.folder.hc.tutorial, 't')
        self.tutorial = self.folder.hc.tutorial.t
        self._createLink(self.folder.hc.link, 'l')
        self.link = self.folder.hc.link.l
        self._createErrorReference(self.folder.hc.error, 'e')
        self.errorRef = self.folder.hc.error.e
    def afterSetUp(self):
        PHCTestCase.PHCTestCase.afterSetUp(self)

        # In the Markup Control Panel, choose more than one text
        # format from the "Alternative Formats" choices
        markup_data = IMarkupSchema(self.portal)
        markup_data.allowed_types = (
            'text/html', 'text/plain', 'text/restructured'
        )

        self._createFAQ(self.folder.hc.faq, 'f')
        self.faq = self.folder.hc.faq.f
        self._createHowto(getattr(self.folder.hc, 'how-to'), 'howto1')
        self.howto = getattr(self.folder.hc, 'how-to').howto1
        self._createTutorial(self.folder.hc.tutorial, 't')
        self.tutorial = self.folder.hc.tutorial.t
        self._createLink(self.folder.hc.link, 'l')
        self.link = self.folder.hc.link.l
        self._createErrorReference(self.folder.hc.error, 'e')
        self.errorRef = self.folder.hc.error.e