Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
cubicweb
cubes
person
Commits
68db81f7bc16
Commit
9b06a3ea
authored
Oct 06, 2015
by
Julien Cristau
Browse files
[schema] import _ from cubicweb
parent
228e8aae534d
Changes
1
Hide whitespace changes
Inline
Side-by-side
schema.py
View file @
68db81f7
...
...
@@ -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'
)]
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment