How to use the wicked.atcontent.wickeddoc.WickedDoc.schema function in wicked

To help you get started, we’ve selected a few wicked examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github socialplanning / opencore / opencore / content / page.py View on Github external
"""
Implementation of an OpenPlans-specific page type, based on
RichDocument w/ interface changes and wicked support.
"""
from Products.Archetypes.public import registerType
from Products.Archetypes.public import Schema
from Products.Archetypes.public import BooleanField
from Products.RichDocument.content.richdocument import RichDocument
from Products.RichDocument.widgets.attachments import AttachmentsManagerWidget
from wicked.atcontent.wickeddoc import WickedDoc
from opencore.interfaces import IOpenPage
from opencore.configuration import PROJECTNAME

from zope.interface import implements

schema = WickedDoc.schema.copy()

hidden_fields = ('relatedItems', 'allowDiscussion')
for fld in hidden_fields:
    schema[fld].widget.visible={'edit': 'invisible',
                                'view': 'invisible',
                                }

schema['text'].scope = 'getContainerPath'
schema['text'].widget.macro = "binsmart_rich"
schema['text'].widget.helper_js = ("toggle_editor.js",)
schema['text'].allowable_content_types = ('text/html',)
schema['text'].default_output_type = 'text/html'

schema['description'].widget.rows = 1

# Prevent bug 1689 from occurring with pages too.

wicked

wicked is a compact syntax for doing wiki-like content linking and creation in zope and plone

GPL-3.0
Latest version published 10 years ago

Package Health Score

36 / 100
Full package analysis