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
addressbook
Commits
9d207206e1ed
Commit
d0456177
authored
Feb 06, 2010
by
Nicolas Chauvat
Browse files
backport stable
parents
11fe098feaf8
872bdea04420
Changes
5
Hide whitespace changes
Inline
Side-by-side
migration/1.2.1_Any.py
View file @
9d207206
if
"PhoneNumber"
in
schema
:
sql
(
'''
CREATE FUNCTION phonetype_sort_value(text) RETURNS int
...
...
@@ -7,4 +5,4 @@ CREATE FUNCTION phonetype_sort_value(text) RETURNS int
LANGUAGE plpythonu;
'''
)
migration/1.5.0_Any.py
View file @
9d207206
add_attribute
(
'PostalAddress'
,
'latitude'
)
add_attribute
(
'PostalAddress'
,
'longitude'
)
add_entity_type
(
'IMAddress'
)
add_entity_type
(
'IMAddress'
)
schema.py
View file @
9d207206
...
...
@@ -20,7 +20,7 @@ class PostalAddress(EntityType):
longitude
=
Float
()
class
IMAddress
(
EntityType
):
im_account
=
String
(
fulltextindexed
=
True
,
required
=
True
,
maxsize
=
64
)
im_account
=
String
(
fulltextindexed
=
True
,
required
=
True
,
maxsize
=
64
)
type
=
String
(
required
=
True
,
internationalizable
=
True
,
vocabulary
=
(
'jabber'
,
'icq'
,
'msn'
),
default
=
u
'jabber'
)
setup.py
View file @
9d207206
...
...
@@ -45,6 +45,6 @@ def install(**kwargs):
url
=
web
,
data_files
=
data_files
,
**
kwargs
)
if
__name__
==
'__main__'
:
install
()
test/test_addressbook.py
View file @
9d207206
...
...
@@ -2,13 +2,13 @@ from logilab.common.testlib import unittest_main
from
cubicweb.devtools.testlib
import
AutomaticWebTest
class
AddressbookAutomaticWebTest
(
AutomaticWebTest
):
def
to_test_etypes
(
self
):
return
set
((
'PhoneNumber'
,
'PostalAddress'
))
def
list_startup_views
(
self
):
return
()
del
AutomaticWebTest
if
__name__
==
'__main__'
:
...
...
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