Welcome | Get started | Dive into Lino | Contribute | Reference
lino.utils.mldbc.fields¶
Defines the babel field classes (BabelCharField
and
BabelTextField
) and the LanguageField
class.
Babel fields are fields that generate a series of normal CharFields (or
TextFields) in the Django model, one for each
lino.core.site.Site.language
.
See Multilingual database content
Functions
|
Used by both |
Classes
|
Define a variable number of CharField database fields, one for each language of your |
|
Define a variable number of clones of the "master" field, one for each language . |
|
A field that lets the user select a language from the available |
- lino.utils.mldbc.fields.contribute_to_class(field, cls, fieldclass, **kw)¶
Used by both
BabelCharField
andBabelTextField
- class lino.utils.mldbc.fields.BabelCharField(*args, db_collation=None, **kwargs)¶
Bases:
CharField
Define a variable number of CharField database fields, one for each language of your
lino.core.site.Site.languages
. See Multilingual database content.
- class lino.utils.mldbc.fields.BabelTextField(*args, **kw)¶
Bases:
RichTextField
Define a variable number of clones of the "master" field, one for each language . See Multilingual database content.
- class lino.utils.mldbc.fields.LanguageField(*args, **kw)¶
Bases:
CharField
A field that lets the user select a language from the available
lino.core.site.Site.languages
.See also
lino.core.model.Model.get_print_language()
.