author | Aurelien Campeas <aurelien.campeas@logilab.fr> |
Fri, 02 Apr 2010 17:27:53 +0200 | |
branch | stable |
changeset 5144 | 5a09bea07302 |
parent 4442 | 7bc0e4ed4109 |
child 5222 | ed6905d98a5e |
permissions | -rw-r--r-- |
1714
a721966779be
new book layout, do not compile yet
sylvain.thenault@logilab.fr
parents:
diff
changeset
|
1 |
Access to persistent data |
a721966779be
new book layout, do not compile yet
sylvain.thenault@logilab.fr
parents:
diff
changeset
|
2 |
-------------------------- |
a721966779be
new book layout, do not compile yet
sylvain.thenault@logilab.fr
parents:
diff
changeset
|
3 |
|
3283 | 4 |
Python-level access to persistent data is provided by the |
5 |
:class:`Entity <cubicweb.entity>` class. |
|
1714
a721966779be
new book layout, do not compile yet
sylvain.thenault@logilab.fr
parents:
diff
changeset
|
6 |
|
a721966779be
new book layout, do not compile yet
sylvain.thenault@logilab.fr
parents:
diff
changeset
|
7 |
An entity class is bound to a schema entity type. Descriptors are added when |
a721966779be
new book layout, do not compile yet
sylvain.thenault@logilab.fr
parents:
diff
changeset
|
8 |
classes are registered in order to initialize the class according to its schema: |
a721966779be
new book layout, do not compile yet
sylvain.thenault@logilab.fr
parents:
diff
changeset
|
9 |
|
a721966779be
new book layout, do not compile yet
sylvain.thenault@logilab.fr
parents:
diff
changeset
|
10 |
* we can access the defined attributes in the schema thanks to the attributes of |
a721966779be
new book layout, do not compile yet
sylvain.thenault@logilab.fr
parents:
diff
changeset
|
11 |
the same name on instances (typed value) |
a721966779be
new book layout, do not compile yet
sylvain.thenault@logilab.fr
parents:
diff
changeset
|
12 |
|
a721966779be
new book layout, do not compile yet
sylvain.thenault@logilab.fr
parents:
diff
changeset
|
13 |
* we can access the defined relations in the schema thanks to the relations of |
a721966779be
new book layout, do not compile yet
sylvain.thenault@logilab.fr
parents:
diff
changeset
|
14 |
the same name on instances (entities instances list) |
a721966779be
new book layout, do not compile yet
sylvain.thenault@logilab.fr
parents:
diff
changeset
|
15 |
|
a721966779be
new book layout, do not compile yet
sylvain.thenault@logilab.fr
parents:
diff
changeset
|
16 |
|
a721966779be
new book layout, do not compile yet
sylvain.thenault@logilab.fr
parents:
diff
changeset
|
17 |
:Formatting and output generation: |
a721966779be
new book layout, do not compile yet
sylvain.thenault@logilab.fr
parents:
diff
changeset
|
18 |
|
a721966779be
new book layout, do not compile yet
sylvain.thenault@logilab.fr
parents:
diff
changeset
|
19 |
* `view(vid, **kwargs)`, applies the given view to the entity |
5144
5a09bea07302
[doc/book] a new chapter on how to use the ORM
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents:
4442
diff
changeset
|
20 |
(and returns an unicode string) |
1714
a721966779be
new book layout, do not compile yet
sylvain.thenault@logilab.fr
parents:
diff
changeset
|
21 |
|
a721966779be
new book layout, do not compile yet
sylvain.thenault@logilab.fr
parents:
diff
changeset
|
22 |
* `absolute_url(**kwargs)`, returns an absolute URL to access the primary view |
a721966779be
new book layout, do not compile yet
sylvain.thenault@logilab.fr
parents:
diff
changeset
|
23 |
of an entity |
2172
cf8f9180e63e
delete-trailing-whitespace
Nicolas Chauvat <nicolas.chauvat@logilab.fr>
parents:
1714
diff
changeset
|
24 |
|
1714
a721966779be
new book layout, do not compile yet
sylvain.thenault@logilab.fr
parents:
diff
changeset
|
25 |
* `rest_path()`, returns a relative REST URL to get the entity |
a721966779be
new book layout, do not compile yet
sylvain.thenault@logilab.fr
parents:
diff
changeset
|
26 |
|
2172
cf8f9180e63e
delete-trailing-whitespace
Nicolas Chauvat <nicolas.chauvat@logilab.fr>
parents:
1714
diff
changeset
|
27 |
* `printable_value(attr, value=_marker, attrtype=None, format='text/html')`, |
1714
a721966779be
new book layout, do not compile yet
sylvain.thenault@logilab.fr
parents:
diff
changeset
|
28 |
returns a string enabling the display of an attribute value in a given format |
a721966779be
new book layout, do not compile yet
sylvain.thenault@logilab.fr
parents:
diff
changeset
|
29 |
(the value is automatically recovered if necessary) |
a721966779be
new book layout, do not compile yet
sylvain.thenault@logilab.fr
parents:
diff
changeset
|
30 |
|
a721966779be
new book layout, do not compile yet
sylvain.thenault@logilab.fr
parents:
diff
changeset
|
31 |
:Data handling: |
a721966779be
new book layout, do not compile yet
sylvain.thenault@logilab.fr
parents:
diff
changeset
|
32 |
|
2172
cf8f9180e63e
delete-trailing-whitespace
Nicolas Chauvat <nicolas.chauvat@logilab.fr>
parents:
1714
diff
changeset
|
33 |
* `as_rset()`, converts the entity into an equivalent result set simulating the |
4442
7bc0e4ed4109
fix stupid sed
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
4437
diff
changeset
|
34 |
request `Any X WHERE X eid _eid_` |
1714
a721966779be
new book layout, do not compile yet
sylvain.thenault@logilab.fr
parents:
diff
changeset
|
35 |
|
5144
5a09bea07302
[doc/book] a new chapter on how to use the ORM
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents:
4442
diff
changeset
|
36 |
* `complete(skip_bytes=True)`, executes a request that recovers at |
5a09bea07302
[doc/book] a new chapter on how to use the ORM
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents:
4442
diff
changeset
|
37 |
once all the missing attributes of an entity |
1714
a721966779be
new book layout, do not compile yet
sylvain.thenault@logilab.fr
parents:
diff
changeset
|
38 |
|
a721966779be
new book layout, do not compile yet
sylvain.thenault@logilab.fr
parents:
diff
changeset
|
39 |
* `get_value(name)`, returns the value associated to the attribute name given |
a721966779be
new book layout, do not compile yet
sylvain.thenault@logilab.fr
parents:
diff
changeset
|
40 |
in parameter |
a721966779be
new book layout, do not compile yet
sylvain.thenault@logilab.fr
parents:
diff
changeset
|
41 |
|
5144
5a09bea07302
[doc/book] a new chapter on how to use the ORM
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents:
4442
diff
changeset
|
42 |
* `related(rtype, role='subject', limit=None, entities=False)`, |
5a09bea07302
[doc/book] a new chapter on how to use the ORM
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents:
4442
diff
changeset
|
43 |
returns a list of entities related to the current entity by the |
5a09bea07302
[doc/book] a new chapter on how to use the ORM
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents:
4442
diff
changeset
|
44 |
relation given in parameter |
1714
a721966779be
new book layout, do not compile yet
sylvain.thenault@logilab.fr
parents:
diff
changeset
|
45 |
|
5144
5a09bea07302
[doc/book] a new chapter on how to use the ORM
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents:
4442
diff
changeset
|
46 |
* `unrelated(rtype, targettype, role='subject', limit=None)`, |
5a09bea07302
[doc/book] a new chapter on how to use the ORM
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents:
4442
diff
changeset
|
47 |
returns a result set corresponding to the entities not (yet) |
5a09bea07302
[doc/book] a new chapter on how to use the ORM
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents:
4442
diff
changeset
|
48 |
related to the current entity by the relation given in parameter |
5a09bea07302
[doc/book] a new chapter on how to use the ORM
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents:
4442
diff
changeset
|
49 |
and satisfying its constraints |
1714
a721966779be
new book layout, do not compile yet
sylvain.thenault@logilab.fr
parents:
diff
changeset
|
50 |
|
a721966779be
new book layout, do not compile yet
sylvain.thenault@logilab.fr
parents:
diff
changeset
|
51 |
* `set_attributes(**kwargs)`, updates the attributes list with the corresponding |
a721966779be
new book layout, do not compile yet
sylvain.thenault@logilab.fr
parents:
diff
changeset
|
52 |
values given named parameters |
a721966779be
new book layout, do not compile yet
sylvain.thenault@logilab.fr
parents:
diff
changeset
|
53 |
|
5144
5a09bea07302
[doc/book] a new chapter on how to use the ORM
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents:
4442
diff
changeset
|
54 |
* `set_relations(**kwargs)`, add relations to the given object. To |
5a09bea07302
[doc/book] a new chapter on how to use the ORM
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents:
4442
diff
changeset
|
55 |
set a relation where this entity is the object of the relation, |
5a09bea07302
[doc/book] a new chapter on how to use the ORM
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents:
4442
diff
changeset
|
56 |
use 'reverse_'<relation> as argument name. Values may be an |
5a09bea07302
[doc/book] a new chapter on how to use the ORM
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents:
4442
diff
changeset
|
57 |
entity, a list of entities, or None (meaning that all relations of |
5a09bea07302
[doc/book] a new chapter on how to use the ORM
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents:
4442
diff
changeset
|
58 |
the given type from or to this object should be deleted). |
5a09bea07302
[doc/book] a new chapter on how to use the ORM
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents:
4442
diff
changeset
|
59 |
|
1714
a721966779be
new book layout, do not compile yet
sylvain.thenault@logilab.fr
parents:
diff
changeset
|
60 |
* `copy_relations(ceid)`, copies the relations of the entities having the eid |
a721966779be
new book layout, do not compile yet
sylvain.thenault@logilab.fr
parents:
diff
changeset
|
61 |
given in the parameters on the current entity |
a721966779be
new book layout, do not compile yet
sylvain.thenault@logilab.fr
parents:
diff
changeset
|
62 |
|
a721966779be
new book layout, do not compile yet
sylvain.thenault@logilab.fr
parents:
diff
changeset
|
63 |
* `delete()` allows to delete the entity |
a721966779be
new book layout, do not compile yet
sylvain.thenault@logilab.fr
parents:
diff
changeset
|
64 |
|
2172
cf8f9180e63e
delete-trailing-whitespace
Nicolas Chauvat <nicolas.chauvat@logilab.fr>
parents:
1714
diff
changeset
|
65 |
|
4437
21f2e01fdd6a
update exemples using the 3.6 api and add/fix some sections (schema, vreg, talk about CW_MODE in concepts...). So much to do :'(
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
3283
diff
changeset
|
66 |
The :class:`AnyEntity` class |
1714
a721966779be
new book layout, do not compile yet
sylvain.thenault@logilab.fr
parents:
diff
changeset
|
67 |
---------------------------- |
2172
cf8f9180e63e
delete-trailing-whitespace
Nicolas Chauvat <nicolas.chauvat@logilab.fr>
parents:
1714
diff
changeset
|
68 |
|
2476
1294a6bdf3bf
application -> instance where it makes sense
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
2172
diff
changeset
|
69 |
To provide a specific behavior for each entity, we have to define a class |
1294a6bdf3bf
application -> instance where it makes sense
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
2172
diff
changeset
|
70 |
inheriting from `cubicweb.entities.AnyEntity`. In general, we define this class |
1294a6bdf3bf
application -> instance where it makes sense
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
2172
diff
changeset
|
71 |
in `mycube.entities` module (or in a submodule if we want to split code among |
1294a6bdf3bf
application -> instance where it makes sense
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
2172
diff
changeset
|
72 |
multiple files) so that it will be available on both server and client side. |
1714
a721966779be
new book layout, do not compile yet
sylvain.thenault@logilab.fr
parents:
diff
changeset
|
73 |
|
3283 | 74 |
The class `AnyEntity` is a sub-class of Entity that add methods to it, |
75 |
and helps specializing (by further subclassing) the handling of a |
|
76 |
given entity type. |
|
1714
a721966779be
new book layout, do not compile yet
sylvain.thenault@logilab.fr
parents:
diff
changeset
|
77 |
|
5144
5a09bea07302
[doc/book] a new chapter on how to use the ORM
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents:
4442
diff
changeset
|
78 |
Most methods defined for `AnyEntity`, in addition to `Entity`, add |
5a09bea07302
[doc/book] a new chapter on how to use the ORM
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents:
4442
diff
changeset
|
79 |
support for the `Dublin Core`_ metadata. |
5a09bea07302
[doc/book] a new chapter on how to use the ORM
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents:
4442
diff
changeset
|
80 |
|
5a09bea07302
[doc/book] a new chapter on how to use the ORM
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents:
4442
diff
changeset
|
81 |
.. _`Dublin Core`: http://dublincore.org/ |
2172
cf8f9180e63e
delete-trailing-whitespace
Nicolas Chauvat <nicolas.chauvat@logilab.fr>
parents:
1714
diff
changeset
|
82 |
|
1714
a721966779be
new book layout, do not compile yet
sylvain.thenault@logilab.fr
parents:
diff
changeset
|
83 |
:Standard meta-data (Dublin Core): |
a721966779be
new book layout, do not compile yet
sylvain.thenault@logilab.fr
parents:
diff
changeset
|
84 |
|
3283 | 85 |
* `dc_title()`, returns a unicode string corresponding to the |
86 |
meta-data `Title` (used by default is the first non-meta attribute |
|
87 |
of the entity schema) |
|
1714
a721966779be
new book layout, do not compile yet
sylvain.thenault@logilab.fr
parents:
diff
changeset
|
88 |
|
a721966779be
new book layout, do not compile yet
sylvain.thenault@logilab.fr
parents:
diff
changeset
|
89 |
* `dc_long_title()`, same as dc_title but can return a more |
3283 | 90 |
detailed title |
1714
a721966779be
new book layout, do not compile yet
sylvain.thenault@logilab.fr
parents:
diff
changeset
|
91 |
|
2172
cf8f9180e63e
delete-trailing-whitespace
Nicolas Chauvat <nicolas.chauvat@logilab.fr>
parents:
1714
diff
changeset
|
92 |
* `dc_description(format='text/plain')`, returns a unicode string |
3283 | 93 |
corresponding to the meta-data `Description` (looks for a |
94 |
description attribute by default) |
|
1714
a721966779be
new book layout, do not compile yet
sylvain.thenault@logilab.fr
parents:
diff
changeset
|
95 |
|
2172
cf8f9180e63e
delete-trailing-whitespace
Nicolas Chauvat <nicolas.chauvat@logilab.fr>
parents:
1714
diff
changeset
|
96 |
* `dc_authors()`, returns a unicode string corresponding to the meta-data |
1714
a721966779be
new book layout, do not compile yet
sylvain.thenault@logilab.fr
parents:
diff
changeset
|
97 |
`Authors` (owners by default) |
a721966779be
new book layout, do not compile yet
sylvain.thenault@logilab.fr
parents:
diff
changeset
|
98 |
|
5144
5a09bea07302
[doc/book] a new chapter on how to use the ORM
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents:
4442
diff
changeset
|
99 |
* `dc_creator()`, returns a unicode string corresponding to the |
5a09bea07302
[doc/book] a new chapter on how to use the ORM
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents:
4442
diff
changeset
|
100 |
creator of the entity |
5a09bea07302
[doc/book] a new chapter on how to use the ORM
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents:
4442
diff
changeset
|
101 |
|
2172
cf8f9180e63e
delete-trailing-whitespace
Nicolas Chauvat <nicolas.chauvat@logilab.fr>
parents:
1714
diff
changeset
|
102 |
* `dc_date(date_format=None)`, returns a unicode string corresponding to |
1714
a721966779be
new book layout, do not compile yet
sylvain.thenault@logilab.fr
parents:
diff
changeset
|
103 |
the meta-data `Date` (update date by default) |
a721966779be
new book layout, do not compile yet
sylvain.thenault@logilab.fr
parents:
diff
changeset
|
104 |
|
2172
cf8f9180e63e
delete-trailing-whitespace
Nicolas Chauvat <nicolas.chauvat@logilab.fr>
parents:
1714
diff
changeset
|
105 |
* `dc_type(form='')`, returns a string to display the entity type by |
1714
a721966779be
new book layout, do not compile yet
sylvain.thenault@logilab.fr
parents:
diff
changeset
|
106 |
specifying the preferred form (`plural` for a plural form) |
4437
21f2e01fdd6a
update exemples using the 3.6 api and add/fix some sections (schema, vreg, talk about CW_MODE in concepts...). So much to do :'(
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
3283
diff
changeset
|
107 |
|
5144
5a09bea07302
[doc/book] a new chapter on how to use the ORM
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents:
4442
diff
changeset
|
108 |
* `dc_language()`, returns the language used by the entity |
5a09bea07302
[doc/book] a new chapter on how to use the ORM
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents:
4442
diff
changeset
|
109 |
|
5a09bea07302
[doc/book] a new chapter on how to use the ORM
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents:
4442
diff
changeset
|
110 |
|
5a09bea07302
[doc/book] a new chapter on how to use the ORM
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents:
4442
diff
changeset
|
111 |
:Misc methods: |
5a09bea07302
[doc/book] a new chapter on how to use the ORM
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents:
4442
diff
changeset
|
112 |
|
5a09bea07302
[doc/book] a new chapter on how to use the ORM
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents:
4442
diff
changeset
|
113 |
* `after_deletion_path`, return (path, parameters) which should be |
5a09bea07302
[doc/book] a new chapter on how to use the ORM
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents:
4442
diff
changeset
|
114 |
used as redirect information when this entity is being deleted |
5a09bea07302
[doc/book] a new chapter on how to use the ORM
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents:
4442
diff
changeset
|
115 |
|
5a09bea07302
[doc/book] a new chapter on how to use the ORM
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents:
4442
diff
changeset
|
116 |
* `pre_web_edit`, callback called by the web editcontroller when an |
5a09bea07302
[doc/book] a new chapter on how to use the ORM
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents:
4442
diff
changeset
|
117 |
entity will be created/modified, to let a chance to do some entity |
5a09bea07302
[doc/book] a new chapter on how to use the ORM
Aurelien Campeas <aurelien.campeas@logilab.fr>
parents:
4442
diff
changeset
|
118 |
specific stuff (does nothing by default) |
4437
21f2e01fdd6a
update exemples using the 3.6 api and add/fix some sections (schema, vreg, talk about CW_MODE in concepts...). So much to do :'(
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
3283
diff
changeset
|
119 |
|
21f2e01fdd6a
update exemples using the 3.6 api and add/fix some sections (schema, vreg, talk about CW_MODE in concepts...). So much to do :'(
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
3283
diff
changeset
|
120 |
Inheritance |
21f2e01fdd6a
update exemples using the 3.6 api and add/fix some sections (schema, vreg, talk about CW_MODE in concepts...). So much to do :'(
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
3283
diff
changeset
|
121 |
----------- |
21f2e01fdd6a
update exemples using the 3.6 api and add/fix some sections (schema, vreg, talk about CW_MODE in concepts...). So much to do :'(
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
3283
diff
changeset
|
122 |
|
21f2e01fdd6a
update exemples using the 3.6 api and add/fix some sections (schema, vreg, talk about CW_MODE in concepts...). So much to do :'(
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
3283
diff
changeset
|
123 |
When describing a data model, entities can inherit from other entities as is |
21f2e01fdd6a
update exemples using the 3.6 api and add/fix some sections (schema, vreg, talk about CW_MODE in concepts...). So much to do :'(
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
3283
diff
changeset
|
124 |
common in object-oriented programming. |
21f2e01fdd6a
update exemples using the 3.6 api and add/fix some sections (schema, vreg, talk about CW_MODE in concepts...). So much to do :'(
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
3283
diff
changeset
|
125 |
|
21f2e01fdd6a
update exemples using the 3.6 api and add/fix some sections (schema, vreg, talk about CW_MODE in concepts...). So much to do :'(
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
3283
diff
changeset
|
126 |
You have the possibility to adapt some entity attributes, as follow: |
21f2e01fdd6a
update exemples using the 3.6 api and add/fix some sections (schema, vreg, talk about CW_MODE in concepts...). So much to do :'(
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
3283
diff
changeset
|
127 |
|
21f2e01fdd6a
update exemples using the 3.6 api and add/fix some sections (schema, vreg, talk about CW_MODE in concepts...). So much to do :'(
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
3283
diff
changeset
|
128 |
.. sourcecode:: python |
21f2e01fdd6a
update exemples using the 3.6 api and add/fix some sections (schema, vreg, talk about CW_MODE in concepts...). So much to do :'(
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
3283
diff
changeset
|
129 |
|
21f2e01fdd6a
update exemples using the 3.6 api and add/fix some sections (schema, vreg, talk about CW_MODE in concepts...). So much to do :'(
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
3283
diff
changeset
|
130 |
from cubes.OTHER_CUBE import entities |
21f2e01fdd6a
update exemples using the 3.6 api and add/fix some sections (schema, vreg, talk about CW_MODE in concepts...). So much to do :'(
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
3283
diff
changeset
|
131 |
class EntityExample(entities.EntityExample): |
21f2e01fdd6a
update exemples using the 3.6 api and add/fix some sections (schema, vreg, talk about CW_MODE in concepts...). So much to do :'(
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
3283
diff
changeset
|
132 |
def dc_long_title(self): |
21f2e01fdd6a
update exemples using the 3.6 api and add/fix some sections (schema, vreg, talk about CW_MODE in concepts...). So much to do :'(
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
3283
diff
changeset
|
133 |
return '%s (%s)' % (self.name, self.description) |
21f2e01fdd6a
update exemples using the 3.6 api and add/fix some sections (schema, vreg, talk about CW_MODE in concepts...). So much to do :'(
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
3283
diff
changeset
|
134 |
|
21f2e01fdd6a
update exemples using the 3.6 api and add/fix some sections (schema, vreg, talk about CW_MODE in concepts...). So much to do :'(
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
3283
diff
changeset
|
135 |
Notice this is different than yams schema inheritance. |
21f2e01fdd6a
update exemples using the 3.6 api and add/fix some sections (schema, vreg, talk about CW_MODE in concepts...). So much to do :'(
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
3283
diff
changeset
|
136 |