doc/book/en/development/datamodel/inheritance.rst
author Nicolas Chauvat <nicolas.chauvat@logilab.fr>
Sun, 08 Nov 2009 19:53:28 +0100
branchstable
changeset 3809 1b9b51ee543e
parent 3257 0d953f0b41c4
permissions -rw-r--r--
[web ui] PrimaryView.render_attributes now uses a table


Inheritance
-----------

When describing a data model, entities can inherit from other entities as is
common in object-oriented programming.

You have the possibility to adapt some entity attributes, as follow:

.. sourcecode:: python

    from cubes.OTHER_CUBE import entities
    class EntityExample(entities.EntityExample):
        def dc_long_title(self):
            return '%s (%s)' % (self.name, self.description)


XXX WRITME