cubicweb/server/test/data-migractions/cubicweb_card/schema.py
author Nicola Spanti <nicola.spanti@logilab.fr>
Thu, 19 Dec 2019 15:13:10 +0100
changeset 12841 fceae84a22dd
parent 12711 9d72e299309e
permissions -rw-r--r--
[py] Make flake8 less angry with cubicweb/server/test/

from yams.buildobjs import EntityType, String, RichString


class Card(EntityType):
    __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, internationalizable=True,
                         default_format='text/rest')
    wikiid = String(maxsize=64, unique=True)