Wednesday, August 12, 2020

The insert window in Office –> Uploads had the fields type and file on the same row, which doesn’t render well in ExtJS (the type combo doesn’t open).

The UploadsByController in presto now has a custom insert_layout which adds the company field.

The insert_layout defined on uploads.UploadsByProject was the same as the one defined on its parent uploads.UploadsByController. Removed duplicate code. This saves one duplicate object in the generated JS.

Oops, the test i added yesterday for covering #3745 caused side effects in the test suite because it created a client. And in min9 the problem was not actually reproduced because min9 had no site_company (and therefore a new person didn’t have any address field, so Lino didn’t even try to create an Address). The test is now being done in min9.tests.test_addresses.

Luc getting started with React

I worked on #3709 (Luc getting started with React). My goal is to have a comprehensible documentation in Lino React Developer Guide.

I merged a pull request introduced by a user g4ndy. Nice surprise : this fixed my problem with the missing glyphs for the primereact fonts.

I am testing it in the cms demo project:

$ go cms
$ pm runserver

The first screen now displays correctly. But when I try to sign in, it gets blank and the JS console reports:

TypeError: c.DomHandler is undefined

Adapt Lino to work with Django 3.1

I opened #3748.

https://docs.djangoproject.com/en/3.1/releases/3.1/

First problem is this:

ImportError: cannot import name 'FieldDoesNotExist'

That was because the compatibility import of django.core.exceptions.FieldDoesNotExist in django.db.models.fields is removed.

A more difficult problem was this:

TypeError: related_objects() missing 1 required positional argument: 'objs'

This was in lino.utils.mti. The delete_child() function used a ChildCollector until now. It is dangerous code. Remember the killer bug some years ago. But I trust that the test suite covers these things quite well.

A last problem was in the welfare test suite (docs/specs/dupable_clients.rst). The sort order of the two Dorothées is changed. The query has always been sorted by [‘-num’, ‘pk’]. I did not find any explanation for it, but I now assume that it is irrelevant for us.