Skip to content
Snippets Groups Projects
Commit 99e3f9c4f822 authored by Sylvain Thénault's avatar Sylvain Thénault
Browse files

use RichString

parent 3dfd0d4f9513
No related branches found
No related tags found
No related merge requests found
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)
......@@ -3,11 +7,9 @@
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)
......@@ -9,9 +11,7 @@
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='**')
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment