equal
deleted
inserted
replaced
25 * the old registration mechanism will be removed when there will be no reference |
25 * the old registration mechanism will be removed when there will be no reference |
26 left to the registerers module in cubicweb and the library of cubes. |
26 left to the registerers module in cubicweb and the library of cubes. |
27 |
27 |
28 Examples: |
28 Examples: |
29 |
29 |
30 .. code-block:: python |
30 .. sourcecode:: python |
31 |
31 |
32 # web/views/basecomponents.py |
32 # web/views/basecomponents.py |
33 def registration_callback(vreg): |
33 def registration_callback(vreg): |
34 vreg.register_all(globals().values(), __name__, (SeeAlsoVComponent,)) |
34 vreg.register_all(globals().values(), __name__, (SeeAlsoVComponent,)) |
35 if 'see_also' in vreg.schema: |
35 if 'see_also' in vreg.schema: |
43 |
43 |
44 |
44 |
45 API d'enregistrement des objets |
45 API d'enregistrement des objets |
46 ``````````````````````````````` |
46 ``````````````````````````````` |
47 |
47 |
48 .. code-block:: python |
48 .. sourcecode:: python |
49 |
49 |
50 register(obj, registryname=None, oid=None, clear=False) |
50 register(obj, registryname=None, oid=None, clear=False) |
51 |
51 |
52 register_all(objects, modname, butclasses=()) |
52 register_all(objects, modname, butclasses=()) |
53 |
53 |