Tuesday, September 19, 2017

Jane is slow when showing tickets

Continued from yesterday.

To fix the problem we now graft a dict _disabled_fields to every table row. On the Actor (actors and dbtables) I replaced the method disabled_fields by two methods get_disabled_fields() and make_disabled_fields(). This method is being used only internally (from lino.core.store and lino.core.model).

I am not sure whether Django caches and shares Model instances between different requests. If it does, then we need to extend the grafted dict to something like _user_to_disabled_fields because the set depends on the user. We wouldn’t want to mix up those of an admin with those of a simple user.

TODO: Maybe we should also rename Model.disabled_fields to sth like disable_data_elems and change the API and all usages so that it returns nothing but receives the set as first arg and modifies that set, adding and possibly removing names.

Developer’s Guide

Doti inspires me. Today I continued to work much in the Contributor's Guide. I especially added two more Lino Minimal projects and a documentation page about them: The Lino Minimal projects.

I converted the docstrings of lino_xl.lib.contacts to prosa style in The contacts plugin. I even added a diagram of the database structure. And can recommend LibreOffice Draw for doing such diagrams.

Side effect: I changed the default value for lino_xl.lib.cal.Plugin.partner_model from Partner to Person.

Travis

We reached a place where it is no longer my own code that causes the welfare test suite to fail on Python 3: https://travis-ci.org/lino-framework/welfare/jobs/277350481

I posted an issue on the appy forum: https://answers.launchpad.net/appy/+question/658295