Welcome | Get started | Dive | Contribute | Topics | Reference | Changes | More

lino.utils.mldbc.fields

Defines the babel field classes (BabelCharField and BabelTextField) and the LanguageField class.

See Introduction to multilingual database content

Functions

contribute_to_class(field, cls, fieldclass, **kw)

Used by both BabelCharField and BabelTextField

Classes

BabelCharField(*args[, db_collation])

Define a variable number of CharField database fields, one for each language of your lino.core.site.Site.languages.

BabelTextField(*args, **kw)

Used for the clones of the master field, one for each non-default language.

LanguageField(*args, **kw)

A field that lets the user select a language from the available lino.core.site.Site.languages.

lino.utils.mldbc.fields.contribute_to_class(field, cls, fieldclass, **kw)

Used by both BabelCharField and BabelTextField

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

Used for the clones of the master field, one for each non-default 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().