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
6d09f272e660
Commit
1b6eaea5
authored
May 01, 2009
by
sylvain.thenault@logilab.fr
Browse files
use rich string
parent
063cd90e7a8a
Changes
1
Hide whitespace changes
Inline
Side-by-side
schema.py
View file @
6d09f272
from
cubicweb.schema
import
format_constraint
class
Person
(
EntityType
):
"""a physical person"""
...
...
@@ -8,10 +6,8 @@ class Person(EntityType):
civility
=
String
(
required
=
True
,
internationalizable
=
True
,
vocabulary
=
(
_
(
'Mr'
),
_
(
'Ms'
),
_
(
'Mrs'
)),
default
=
'Mr'
)
description_format
=
String
(
meta
=
True
,
internationalizable
=
True
,
maxsize
=
50
,
default
=
'text/rest'
,
constraints
=
[
format_constraint
])
description
=
String
(
fulltextindexed
=
True
)
description
=
RichString
(
fulltextindexed
=
True
)
if
'PhoneNumber'
in
defined_types
:
# from addressbook package
phone
=
SubjectRelation
(
'PhoneNumber'
,
composite
=
'subject'
)
...
...
Write
Preview
Markdown
is supported
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