Wednesday, July 27, 2016

Support for applications with responsive design

Cool! It is now possible to write Lino applications that use different screen layouts depending on the device they are running on. At least theoretically because the basic concepts are now implemented. I opened a new ticket #1076 for this.

The first plugin which uses this new feature is lino_xl.lib.courses (and its descendants lino_voga.lib.courses and lino_voga.projects.voga2.lib.courses).

Responsive Design Support was not a very urgent feature, but it will be needed to write a good solution for #1078.

Summary of changes:

  • Lino now differentiates between the “models module” and the “actors module” of a plugin.

  • New dictionary rt.models contains the “actors” modules of each plugin.

  • On plugins which define a design module, the models module should no longer contain actors.

  • New site attributes lino.core.site.Site.design_name

  • rt.get_actors_module

  • Note that choicelists aren’t actors and should be in rt.models

TODO: write documentation and a concrete example.

Notifications framework

Ticket #1079 (Le système de mail ne fonctionne plus quand on clique sur “Arriver” pour envoyer la personne en salle d’attente) caused me to make some important changes to the notifications API. The first version had some quite strange constructs. I think it is getting better. And I also added two test modules to Lino Welfare.

And I fixed a bug in lino.utils.djangotest which caused one of these tests to fail when being run as part of the suite and to pass when run individually. It seems that Django does not automatically reset the current language between successive tests.