Welcome | Get started | Dive | Contribute | Topics | Reference | Changes | More
lino.utils.mldbc.mixins¶
Defines the model mixins BabelNamed
and BabelDesignation
.
Classes
|
Mixin for models that have a babel field "Designation" (i.e. one designation for each language defined in the site's |
|
Mixin for models that have a babel field name (labelled "Designation" by default) for each language. |
- class lino.utils.mldbc.mixins.BabelNamed(*args, **kwargs)¶
Bases:
Model
Mixin for models that have a babel field name (labelled “Designation” by default) for each language.
This mixin is deprecated (but without any planned expiry date so far). For new applications we recommend to use
BabelDesignated
instead. Because the term “name” is used in programming to refer to something (which we implement as Referrable). So we don’t recommend to use a database field having “name” as name.- name¶
The translatable name of this database row.
- class lino.utils.mldbc.mixins.BabelDesignated(*args, **kwargs)¶
Bases:
Model
Mixin for models that have a babel field “Designation” (i.e. one designation for each language defined in the site’s
languages
.This is the same as
BabelNamed
but the internal field name matches the label.- designation¶
The translatable name of this database row.