Commit 9b06a3ea authored by Julien Cristau's avatar Julien Cristau
Browse files

[schema] import _ from cubicweb

parent 228e8aae534d
......@@ -3,8 +3,11 @@ from yams.buildobjs import (EntityType, SubjectRelation, String, RichString,
from yams.reader import context
from cubicweb.schema import RRQLExpression, RQLConstraint
try:
from cubicweb import _
except ImportError:
_ = unicode
_ = unicode
class Person(EntityType):
"""a physical person"""
......@@ -24,7 +27,6 @@ class Person(EntityType):
im_address = SubjectRelation('IMAddress', composite='subject')
class use_email(RelationDefinition):
"""person's email account"""
__permissions__ = {
......@@ -49,4 +51,3 @@ class primary_email(RelationDefinition):
object = "EmailAddress"
cardinality = '??'
constraints= [RQLConstraint('S use_email O')]
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment