Monday, July 22, 2019

I entered our purchase invoices into our Lino Così. Which caused a series of changes:

I added a detail view to lino_cosi.lib.contacts.Partners. While this view is irritating in applications without accounting, for Lino Così it is irritating to not have it.

The chooser for lino_xl.lib.vat.VatDocument.vat_regime had a typo bug causing a TypeError: get_vat_regime_choices() takes from 0 to 2 positional arguments but 3 were given when user tried to change the vat regime of a voucher.

Using Ctrl+x on a voucher to run lino_xl.lib.ledger.Voucher.toggle_state() changed the voucher state but did not actually register the voucher (i.e. create movements, compute totals, …).

I released version 19.7.3 of Lino and XL to PyPI. Although the test suites are still failing. I hope that th failures are trivial and only caused by the test suite and not by a bug.


Session with Tonis: When you maintain a Lino server, then you don’t want to decide for each new site which dbengine to use. You decide this once for all during configure. In general, apt-get install is called only during configure, never during 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 startsite.

After session with Hamza:

  • Optimized confirmations and messages.

  • Added an Installer class to avoid passing batch all the time, and to have a single call to apt-get.

  • Added --depth 1 -b master to git clong commands because history is usually not needed.

  • Added logfile setup

  • Optimized nginx config file creation. Fixed a bug : the symlink was issued from the src in roject dir but it must link to the copy in sites_available.

  • Reviewed the getlino docs page.

I tested using:

sudo -H startsite cosi a --dev --linodev --shared-env /usr/local/lino/shared

The --linodev option is currently required because of the appy issue we fixed with Hamza.

The --dev option is currently required in most cases because we don’t yet do pypi releases for applications

The new --shared-env option can save time during testing. Usage:

--shared-env /usr/local/lino/shared

This option has no default value, i.e. default is to not use any shared env.

Note that when using a shared env, also static files are shared.

The --env-dir and --repos-dir options should probably always remain at their default values (“env” and “repositories”).


  • runserver in a newly created site doesn’t yet serve the static files. Maybe because ‘static’ just a symlink?

  • repos-dir and env-dir need to be reviewed in startsite template

  • when using shared env, the static subdir of each site must also be a symlink to the shared

  • I did not yet test pgsql setup after my changes.

  • The nginx configuration file causes warnings

  • mysql database setup also failed when the user or the database already existed. Now runs three separate commands. If the first or second fails, the privileges are still done. Disadvantage is that now it asks each time for the root password… not sure how to fix that.