schemas/Card.py
author Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
Wed, 18 Feb 2009 19:19:57 +0100
branchtls-sprint
changeset 823 cb8ccbef8fa5
parent 624 258e5692ae06
permissions -rw-r--r--
main template refactoring there are 2 main templates : - one for non templatable views (xml, binaries, etc.) - one for the other views The right one is chosen according to its selectors

# 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)