use RichString wherever possible in the stdlib tls-sprint
authorAdrien Di Mascio <Adrien.DiMascio@logilab.fr>
Mon, 16 Feb 2009 13:03:12 +0100
branchtls-sprint
changeset 627 36ade1128af7
parent 624 258e5692ae06
child 628 3a6f28a1ea21
use RichString wherever possible in the stdlib
schemas/base.py
schemas/bootstrap.py
--- a/schemas/base.py	Mon Feb 16 12:33:14 2009 +0100
+++ b/schemas/base.py	Mon Feb 16 13:03:12 2009 +0100
@@ -138,10 +138,8 @@
     """
     name = String(required=True, indexed=True, internationalizable=True,
                   maxsize=256)
-    description_format = String(meta=True, internationalizable=True, maxsize=50,
-                                default='text/rest', constraints=[format_constraint])
-    description = String(fulltextindexed=True,
-                         description=_('semantic description of this state'))
+    description = RichString(fulltextindexed=True, default='text/rest',
+                             description=_('semantic description of this state'))
     
     state_of = SubjectRelation('EEType', cardinality='+*',
                     description=_('entity types which may use this state'),
--- a/schemas/bootstrap.py	Mon Feb 16 12:33:14 2009 +0100
+++ b/schemas/bootstrap.py	Mon Feb 16 13:03:12 2009 +0100
@@ -14,10 +14,8 @@
     """define an entity type, used to build the application schema"""
     name = String(required=True, indexed=True, internationalizable=True,
                   unique=True, maxsize=64)
-    description_format = String(meta=True, internationalizable=True, maxsize=50,
-                                default='text/plain', constraints=[format_constraint])
-    description = String(internationalizable=True,
-                         description=_('semantic description of this entity type'))
+    description = RichString(internationalizable=True, 
+                             description=_('semantic description of this entity type'))
     meta = Boolean(description=_('is it an application entity type or not ?'))
     # necessary to filter using RQL
     final = Boolean(description=_('automatic'))