Welcome | Get started | Dive | Contribute | Topics | Reference | Changes | More
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"
>>> print(rstgen.attrtable(DB_ENGINES, cols))
============ ================= ============ ============== ============
name python_packages service default_port needs_root
------------ ----------------- ------------ -------------- ------------
mysql mysqlclient mysql 3306 True
postgresql psycopg2 postgresql 5432 True
sqlite3 None False
============ ================= ============ ============== ============
A dbengine also has an attribute apt_packages
, but we don’t print it
here because its value can depend on the environment.
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.