goa/skel/schema.py
author Alexandre Fayolle <alexandre.fayolle@logilab.fr>
Thu, 22 Apr 2010 19:37:56 +0000
branchstable
changeset 5376 2c3f14bc2590
parent 4212 ab6573088b4a
child 5421 8167de96c523
permissions -rw-r--r--
[python2.6] don't add a name property on Thread in Python2.6 the threading.Thread class has a name attribute (used to be __name). The old code would trigger a infinite recursion.

"""

:organization: Logilab
:copyright: 2001-2010 LOGILAB S.A. (Paris, FRANCE), license is LGPL v2.
:contact: http://www.logilab.fr/ -- mailto:contact@logilab.fr
:license: GNU Lesser General Public License, v2.1 - http://www.gnu.org/licenses
"""

class Blog(EntityType):
    title = String(maxsize=50, required=True)
    description = String()

class BlogEntry(EntityType):
    title = String(maxsize=100, required=True)
    publish_date = Date(default='TODAY')
    text = RichString(fulltextindexed=True)
    category = String(vocabulary=('important','business'))
    entry_of = SubjectRelation('Blog', cardinality='?*')