common/test/data/schema/Note.py
author Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
Tue, 25 Nov 2008 12:34:05 +0100
changeset 136 ff51a18c66a3
parent 0 b97547f5f1fa
permissions -rw-r--r--
ask less questions on instance creation

from cubicweb.schema import format_constraint

class AnotherNote(EntityType):
    descr_format = String(meta=True, internationalizable=True,
                                default='text/rest', constraints=[format_constraint])
    descr = String(fulltextindexed=True,
                   description=_('more detailed description'))
    descr2_format = String(meta=True, internationalizable=True,
                                default='text/rest', constraints=[format_constraint])
    descr2 = String(fulltextindexed=True,
                    description=_('more detailed description'))
    

class SubNote(AnotherNote):
    __specializes_schema__ = True
    descr3 = String()