Thursday, April 23, 2020

Registrable and toggle_state

Oops, #3602 was more complex. No no, the Registrable mixin worked also when there was no state named “registered”. We do want certain fields of a course to be read-only in certain states. We don’t want let end users edit e.g. the teacher or the room of an active course. To change these fields, you need to first switch back to “draft”. This concept of “registrable fields” is the main feature of Registrable.

Only the relatively new toggle_state action also required a state named “registered”.

I undid my yesterday changes (i.e. Reservation again inherits from Registrable) and moved the toggle_state action to the lino_xl.lib.ledger.RegistrableVoucher mixin. Also started to review the docstrings.

Miscellaneous

We fixed a subtle bug : Lino can get confused when collecting STATICFILES_DIRS on a site having a project_dir containing a symbolic link. This later caused Django to complain about duplicate files during collectstatic.

And Lino no longer sets the STATICFILES_DIRS Django setting. This setting is not used by Lino, I remember vaguely that I have been trying to use it when experimenting with a Qooxdoo front end years ago.

The default name of the directory used as STATIC_ROOT is now static_root (and no longer static). Getlino always creates it as a subdirectory of the environment.

That’s mainly because static is used for the “source” directories of the collectstatic command, and it sounds a bit dangerous to use the same name for the target directory.

Presto

Yesterday I recorded a first screen cast about Lino Presto and added a link to it in Eine Besichtigungstour. Yes, it’s in German, the customer’s language.

Today I fixed a few demo effects encountered in the screen cast (search by client name, filter per team in Orders table)

I started to prepare the next screen cast, which will show the calendar view. At least one thing was still missing there : customized values in lino_xl.lib.cal.PlannerColumns.

Discovered another bug : filtering doesn’t seem to work in the weekly or daily calendar view.