Installation | Topics | Beyond Lino

Multiple front ends for a same site

You can configure two different Django projects (web sites) to serve a same Lino site using different front ends. They will have different domain names and nginx configurations, but share the same application code and database.

The file of one of them will import the settings of the other one, and will basically just change the default_ui setting.

  • Use getlino startsite to create the first Lino site:

    # getlino startsite noi mysite
  • Create another directory called m, next to the project directory:

    # go mysite
    # mkdir ../m
    # cp -a nginx ../m
    # ln -s env ../m
    # go m

In the project directory of the site, create a file named with this content:

from lino_local.mysite.settings import *

class Site(Site):
    master_site = SITE
    default_ui = "lino_react.react"

SITE = Site(globals())


Adapt the and the nginx/uwsgi.ini files (replace “mysite” by “m”).

Manually copy the config files for supervisor and nginx or apache.

Install the alternative front end into the virtualenv:

$ . env/bin/activate
$ pip install lino_react