# HG changeset patch
# User Sylvain Thénault <sylvain.thenault@logilab.fr>
# Date 1248357081 -7200
#      Thu Jul 23 15:51:21 2009 +0200
# Node ID 99e3f9c4f8222fe62dde618f037c10c4c2d74ec8
# Parent  3dfd0d4f9513f36e17b4b5793ed54171e102d150
use RichString

diff --git a/schema.py b/schema.py
--- a/schema.py
+++ b/schema.py
@@ -1,17 +1,17 @@
 from yams.buildobjs import EntityType, String, SubjectRelation
-from cubicweb.schema import format_constraint
+try:
+    from yams.buildobjs import RichString
+except ImportError:
+    from cubicweb.schema import RichString
+
 
 class Blog(EntityType):
     title = String(maxsize=50, required=True)
-    description_format = String(meta=True, internationalizable=True, maxsize=50,
-                                default='text/rest', constraints=[format_constraint])
-    description = String()
+    description = RichString()
     rss_url = String(maxsize=128, description=_('blog\'s rss url (useful for when using external site such as feedburner)'))
 
 
 class BlogEntry(EntityType):
     title = String(required=True, fulltextindexed=True, maxsize=256)
-    content_format = String(meta=True, internationalizable=True, maxsize=50,
-                            default='text/rest', constraints=[format_constraint])
-    content = String(required=True, fulltextindexed=True)
+    content = RichString(required=True, fulltextindexed=True)
     entry_of = SubjectRelation('Blog', cardinality='**')