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

lino.api

Documentation is being migrated to prosa style in API.

Another set of modules defined here are for more technical usage in specialized context:

doctest

A selection of names to be used in tested documents as follows:

shell

A shortcut import for usage in a Django shell or a pm run script.

selenium

Defines the Tour class and a runserver() function.

Functions

startup([settings_module, globals_dict])

Start up Django and Lino.

lino.api.startup(settings_module=None, globals_dict=None)

Start up Django and Lino.

Optional settings_module is the name of a Django settings module. If this is specified, set the DJANGO_SETTINGS_MODULE environment variable.

This is called automatically when a process is invoked by a django-admin command.

This is usually called in the initialization code snippet of a tested document.

If your doctest reports a failure of the following type:

Failed example:
    startup('lino_amici.projects.amici1.settings')
Expected nothing
Got:
    Started /usr/lib/python3.10/doctest.py ... docs/specs/overview.rst (using lino_amici.projects.amici1.settings.demo) --> PID 217238

then it’s because your project directory contains a log directory.