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

about : Information about a site

The lino.modlib.about plugin is always installed. It defines some virtual tables and choicelists, but no database models.

Lines starting with >>> in this document are code snippets that get tested as part of our development workflow.

>>> import lino
>>> lino.startup('lino_book.projects.noi1e.settings.demo')
>>> from lino.api.doctest import *

Which means that code snippets in this document are tested using the lino_book.projects.noi1e demo project.

Information about the site

class lino.modlib.about.About

A dialog window which displays some information about the site.

Versions of used third-party libraries.

Time stamps of source code.

Complexity factors: Some numbers that express the complexity of this site. These numbers may be used by a hosting provider for computing the price of their services.

Time zones

Every Lino site can define its own list of time zones.

>>> rt.show('about.TimeZones')
======= ========= =================
 value   name      text
------- --------- -----------------
 01      default   UTC
 02                Europe/Tallinn
 03                Europe/Brussels
 04                Africa/Tunis
======= ========= =================

This list is usually populated in the local workflows_module of a project. For example:

# don't forget to import the default workflows:
from lino_noi.lib.noi.workflows import *

from lino.modlib.about import TimeZones
TimeZones.clear()
add = TimeZones.add_item
add('01', settings.TIME_ZONE or 'UTC', 'default')
add('02', "Europe/Tallinn")
add('03', "Europe/Brussels")
add('04', "Africa/Tunis")
class lino.modlib.about.TimeZones

The list of time zones available on this site.

This choicelist always contains at least one choice named default.

You can redefine this choicelist in your local workflows_module.

default

The default time zone on this server, corresponding to TIME_ZONE. Unlike TIME_ZONE (which is a string), default is a Choice object whose text is the same as the string and which has an attribute tzinfo, which contains the time zone info object.

Date formats

class lino.modlib.about.DateFormats

A list of date formats.

This is currently used only by the lino_xl.lib.google plugin. Date formatting is configured site-wide in lino.core.site.Site.date_format_strftime & Co.

>>> rt.show('about.DateFormats')
======= ========= ==========
 value   name      text
------- --------- ----------
 010     default   dd.mm.y
 020               dd.mm.yy
 030               dd/mm/y
 040               dd/mm/yy
======= ========= ==========