Beispiel #1
0
from zope import schema
from memphis.schema import api
from memphis.schema.interfaces import _

# Boolean
api.registerField('boolean', schema.Bool, 
                  _("Boolean"),
                  _("Boolean field (YES or NO)."))

# Integer
api.registerField('int', schema.Int,
                  _("Integer"),
                  _("Field containing an Integer Value."))

# Text
api.registerField('text', schema.Text,
                  _("Text"),
                  _("Field containing text with newlines."))

# Text Line
api.registerField('textline', schema.TextLine,
                  _("Text Line"),
                  _("Field containing text line without newlines."))

# Float
api.registerField('float', schema.Float,
                  _("Float"),
                  _("Field containing a Float."))

# Decimal
api.registerField('decimal', schema.Decimal,
Beispiel #2
0
# python package

from memphis.schema import api
from memphis.schema.interfaces import _
from memphis.schema.richtext.field import RichText

# RichText
api.registerField('richtext', RichText, 
                  _("Rich text"),
                  _("Text field with different mime type support."))