Settings API

This section describes Lino-specific considerations about certain Django settings. For introductive texts see Lino and your Django settings, What is an application?.

AUTHENTICATION_BACKENDS

See http://docs.djangoproject.com/en/2.2/ref/settings/#authentication-backends

See Social Authentication

Unlike with plain Django applications, in Lino you do not need to set AUTHENTICATION_BACKENDS yourself, Lino will do that for you, based the following criteria:

DATABASES

Lino sets this to SQLite on a file default.db in your project_dir.

See http://docs.djangoproject.com/en/2.2/ref/settings/#databases

EMAIL_SUBJECT_PREFIX

See Django docs

Lino also uses this in lino.modlib.notify.

FIXTURE_DIRS

See Django docs

LOGGING
LOGGING_CONFIG

Lino sets LOGGING_CONFIG to lino.utils.log.configure() which is our suggetion for a lightweight flexible logging configuration method. If you leave LOGGING_CONFIG unchanged, you can configure your logging preferences using the LOGGING setting. Some examples:

LOGGING = dict(filename='/var/log/lino/system.log'), level='DEBUG')
LOGGING = dict(filename=join(SITE.project_dir, 'log', 'system.log'), level='DEBUG')
LOGGING = dict(filename=None, level='DEBUG')

You don't need to use Lino's logging config. In that case, refer to https://docs.djangoproject.com/en/2.2/ref/settings/#logging-config

USE_L10N

Lino sets this automatically when lino.core.site.Site.languages is not None.

See http://docs.djangoproject.com/en/2.2/ref/settings/#use-l10n

LANGUAGE_CODE

Lino sets this automatically when lino.core.site.Site.languages is not None.

See http://docs.djangoproject.com/en/2.2/ref/settings/#language-code

MIDDLEWARE_CLASSES

Lino still uses MIDDLEWARE_CLASSES instead of MIDDLEWARE. One day we will upgrade all Lino middleware to the new middleware style.

LANGUAGES

Lino sets this automatically when your SITE.languages is not None.

Used by lino.modlib.fields.LanguageField.

See http://docs.djangoproject.com/en/2.2/ref/settings/#languages

ROOT_URLCONF

This is set to the value of your Site's root_urlconf attribute (which itself defaults to lino.core.urls).

See URL dispatcher section of the Django documentation.

INSTALLED_APPS

See Django docs.

In a Lino application you set your INSTALLED_APPS indirectly by overriding the get_installed_apps method. Alternatively, in very small projects (such as the projects in Tutorial projects) you might prefer to specify them as positional arguments to the Site constructor.

DEBUG

See 2010-07-16

SERIALIZATION_MODULES

See Django docs.

USE_TZ
TIME_ZONE

See Python dumps by example