schemas/Card.py
author sylvain.thenault@logilab.fr
Thu, 26 Mar 2009 18:54:26 +0100
branchtls-sprint
changeset 1143 8d097defbf2c
parent 624 258e5692ae06
permissions -rw-r--r--
change the way selected/__init__ are used for AppRsetObject

# from cubicweb.schema import format_constraint

class Card(EntityType):
    """a card is a textual content used as documentation, reference, procedure reminder"""
    permissions = {
        'read':   ('managers', 'users', 'guests'),
        'add':    ('managers', 'users'),
        'delete': ('managers', 'owners'),
        'update': ('managers', 'owners',),
        }
    
    title    = String(required=True, fulltextindexed=True, maxsize=256)
    synopsis = String(fulltextindexed=True, maxsize=512,
                      description=_("an abstract for this card"))
    content = RichString(fulltextindexed=True, default_format='text/rest')
    wikiid = String(maxsize=64, indexed=True)