Welcome | Get started | Dive into Lino | Contribute | Reference | More

help : Make local help pages

The lino.modlib.help plugin adds functionality for loading extracted help texts at startup and optionally adding a Help button to all data views. See Help texts for a topic overview.

It defines some startup hooks and the django-admin command makehelp.

It also defines a database model for storing site contacts.

This is a tested document. The following instructions are used for initialization:

>>> import lino
>>> lino.startup('lino_book.projects.cms1.settings')
>>> from django.utils import translation
>>> from lino.api.doctest import *
>>> from django.db.models import Q
>>> from atelier.sheller import Sheller
>>> shell = Sheller()

The help button

As a site maintainer you can activate the Help button by setting help.make_help_pages to True.

Having a Help button requires the site to generate local help pages. So when this is True, call makehelp generate the help pages.

Site contacts

When help.use_contacts is set to True, the server administrator can edit a table of site contacts.

>>> rt.show(help.SiteContacts)
=================== =============== ==================== ================================= ================================= =================================
 Site contact type   Organization    Represented by       Remark                            Remark (de)                       Remark (fr)
------------------- --------------- -------------------- --------------------------------- --------------------------------- ---------------------------------
 Site owner          Rumma & Ko OÜ   Mrs Erna Ärgerlich
 Site maintainer     Van Achter NV
 Hotline                             Mrs Annette Arens    Mon and Fri from 11:30 to 12:00   Mon and Fri from 11:30 to 12:00   Mon and Fri from 11:30 to 12:00
=================== =============== ==================== ================================= ================================= =================================

The Site contact type field of a site contact points to the SiteContactTypes choicelist, which can be modified by the server administrator.

>>> rt.show(help.SiteContactTypes)
======= ============ =================
 value   name         text
------- ------------ -----------------
 100     owner        Site owner
 200     maintainer   Site maintainer
 300     hotline      Hotline
======= ============ =================

Configuration options

This plugin defines the following plugin settings:


Whether to activate the help button.


Whether this Lino site has a table of site contacts.

See Site contacts below.

The makehelp command

This plugin adds the following django-admin command.


Generate the local help pages for this Lino site.

>>> shell("django-admin makehelp --help")
usage: django-admin makehelp [-h] [-t TMPDIR] [-l LANGUAGE] [--version] [-v {0,1,2,3}]
                             [--settings SETTINGS] [--pythonpath PYTHONPATH] [--traceback] [--no-color]
                             [--force-color] [--skip-checks]

Generate the local help pages for this Lino site.

  -h, --help            show this help message and exit
  -t TMPDIR, --tmpdir TMPDIR
                        Path for temporary files.
  -l LANGUAGE, --language LANGUAGE
                        Generate only the specified language.
  --version             Show program's version number and exit.
  -v {0,1,2,3}, --verbosity {0,1,2,3}
                        Verbosity level; 0=minimal output, 1=normal output, 2=verbose output, 3=very
                        verbose output
  --settings SETTINGS   The Python path to a settings module, e.g. "myproject.settings.main". If this
                        isn't provided, the DJANGO_SETTINGS_MODULE environment variable will be used.
  --pythonpath PYTHONPATH
                        A directory to add to the Python path, e.g. "/home/djangoprojects/myproject".
  --traceback           Raise on CommandError exceptions.
  --no-color            Don't colorize the command output.
  --force-color         Force colorization of the command output.
  --skip-checks         Skip system checks.