Installation | Topics | Beyond Lino
Site settings reference for maintainers¶
Some common site settings¶
The following settings of a Lino site are defined as class attributes of
lino.core.site.Site
.
- languages¶
The language distribution to be used on this site.
This must be either None, or an iterable of language codes, or a string containing a space-separated series of language codes.
Examples:
languages = "en de fr nl et" languages = ['en', 'fr'] languages = 'en'
The first language in this list is the site’s default language, returned by
get_default_language()
.
- use_help¶
Whether this site uses
lino.modlib.help
.Default value is
False
.
- use_ipdict¶
Whether this site uses
lino.modlib.ipdict
.Default value is
False
.Note that
lino.modlib.ipdict
unlike normal plugins should not be installed by adding it to yourget_installed_plugins()
method but by setting this attribute. This approach has the advantage of also settingMIDDLEWARE_CLASSES
automatically.
- default_ui¶
The full Python name of the plugin that acts as main front end on this site.
Default value is
lino.modlib.extjs
. Other candidates arelino_react.react
,lino.modlib.bootstrap3
,lino_openui5.openui5
,lino_xl.lib.pages
andlino_extjs6.extjs6
.Another possibility is to set it to None. In that case you must probably also set
root_urlconf
to a custom URL dispatcher.
Advanced site settings¶
A string with a space-separated list of language codes that should be hidden. This is useful when you have multilingual database content and a language distribution of more than three languages.
- webdav_protocol¶
Set this to a string like e.g. ‘wdav’ to instruct Lino to use this custom protocol instead of
http
when linking to “editable” printable documents.See WebDAV.
- webdav_url¶
The URL location for webdav files. In a normal production configuration you should leave this unchanged and Lino will set the default value
'/media/webdav/'
. You also need to configure your web server to actually serve the files below this location using the WebDAV protocol. See WebDAV.Obsolete: This may be used to simulate a WebDAV location on a development server. For example on a Windows machine, you may set it to
w:\
, and before invokingrunserver
, you issue in a command prompt:subst w: <dev_project_path>\media\webdav
- webdav_root¶
The path on server to store webdav files. Default is
Site.site_dir
+ ´/media/webdav’.
- custom_layouts_module¶
The name of the custom layouts module to be used on this site. Default value is defined by the application developer.
- workflows_module¶
The name of the workflows module to be used on this site. Default value is defined by the application developer.
- user_types_module¶
The name of the user types module to be used on this site. Default value is defined by the application developer.
For example:
class Site(Site): user_types_module = 'myapp.user_types'
- use_security_features = False¶
Set this to True in order to activate a selection of security features to protect against miscellaneous attacks. You can do this only if your application is being served via HTTPS. The idea is to provide a reasonable security out of the box.
This will activate some middleware and set some security-related settings. This is a new feature and not much tested. As a hoster you may prefer adding security manually using your established standards (regarding security Lino does not add anything to plain Django). See also Security of Lino applications.
- root_urlconf = 'lino.core.urls'¶
The value to be assigned to
ROOT_URLCONF
when thisSite
instantiates.The default value is
lino.core.urls
.
- social_auth_backends = None¶
A list of backends for Python Social Auth (PSA).
Having this at a value different from None means that this site uses authentication via third-party providers.
Sites which use this feature must also install PSA into their environment (which is done automatically by
install
).Depending on the backend you must also add credentials in your local
settings.py
file, e.g.:SOCIAL_AUTH_GOOGLE_OAUTH2_KEY = \ '1234567890-a1b2c3d4e5.apps.googleusercontent.com' SOCIAL_AUTH_GOOGLE_OAUTH2_SECRET = 'SH6da...'
A working example is in the
lino_book.projects.noi1e
demo project.
- appy_params¶
Default value is dict(ooPort=8100, pythonWithUnoPath=’/usr/bin/python3’, raiseOnError=True).
Used by
lino_xl.lib.appypod.choicelist.AppyBuildMethod
.Allowed keyword arguments for appy.pod.renderer.Render are:
pythonWithUnoPath=None, ooPort=2002 stylesMapping={} forceOoCall=False, finalizeFunction=None overwriteExisting=False raiseOnError=False imageResolver=None
See the source code for details.
See also More about the LibreOffice service
Common issues you can fix using your settings.py
¶
Activate ElasticSearch: see use_elasticsearch
and
search.elasticsearch_url
.
Configure the columns to print in the body of an invoice when using the
appy_pod
build method (More about the LibreOffice service): see
sales.print_items_table
.
Whether this site accepts user accounts that are linked to some third-party
authentication provider (Google, Facebook, Wikipedia, …). See
users.third_party_authentication
.