Getlino and database settings

Getlino knows the following Django database engines:

>>> from getlino.utils import DB_ENGINES
>>> import rstgen
>>> cols = "name python_packages service default_port needs_root apt_packages"
>>> print(rstgen.attrtable(DB_ENGINES, cols))  
============ ================= ============ ============== ============ ===============...=======
 name         python_packages   service      default_port   needs_root   apt_packages
------------ ----------------- ------------ -------------- ------------ ---------------...-------
 mysql        mysqlclient       mysql        3306           True         ...
 postgresql   psycopg2          postgresql   5432           True         postgresql postgresql-contrib libpq-dev python-dev
 sqlite3                        None                        False
============ ================= ============ ============== ============ ===============...=======

The apt_packages for mysql depend on the distro.

Database settings

Getlino fills values to the items user, password, password and engine of Django's DATABASES setting.

Multiple database engines on a same server

Note that getlino startsite does not install any db engine because this is done by getlino configure.

When you maintain a Lino server, you don't want to decide for each new site which database engine to use. You decide this once during getlino configure. In general, apt-get install is called only during getlino configure, never during getlino startsite. If you have a server with some mysql sites and exceptionally want to install a site with postgres, you simply call getlino configure before calling getlino startsite.

You may use multiple database engines on a same server by running configure between startsite invocations.