Tuesday, March 22, 2016

I continued to work on #834 (Install Lino on welstv).

05h45 : Uff, I finally got initdb_demo to run on their site! The problems were mostly due to recent internal changes and appeared only now either because our test coverage is not perfect. The last problem (reported Sunday, March 20, 2016) was because lino.utils.html2xhtml requires the HTML Tidy library to be installed on the system. There was also yet another encoding problem dd.babel2kw caused by futurize’s newstr (i.e. #36).

Hamza is now working full speed on #37. Yesterday evening we had another voice session with shared screen. Now I merged his pull request into the master of lino_extjs6.

I committed my changes to lino, xl, welfare and logos.

Voice session with Alexa.

I tried to reproduce #841. We have a duplicated participant there (ID 261 and ID 1391). And when trying to merge them, we get a server taceback ending with IntegrityError: (1062, “Duplicate entry ‘261’ for key ‘PRIMARY’”). But we did not yet find out how to reproduce this situation.

We need a third item in courses.CourseStates. Until now we had “draft” and “registered”. The “draft” remains, all “registered” courses become “active”, and there is a new state “inactive”. This last state means: the general course conditions have been discussed and fixed, and user can start to create enrolments, but the course will start only when there are enough participants.

And a fourth CourseState “closed”. Lino Voga will certainly need it.

These changes will also be visible in CPAS de Châtelet. I deliberately didn’t ask their opinion because I can always go back for them if they don’t want it.

A Status Report for Lino Voga

I added a report called “Belegstatus” (#842). It is a document they currently print out every morning. I implemented it as lino_voga.lib.courses.models.StatusReport and also installed it to the get_admin_main_items for lino_voga.projects.base.

This was the first EmptyTable which I wanted to print using wkhtmltopdf instead of appypod. This required some internal optimizations, but I like the result: We now have a generic template for printing such global reports.

wkhtmltopdf still does not yet have page header and footer. The challenge with this is that we want to have them configurable. So they should be named ‘FOO_header.wk.html’. But they should be optional.

http://wkhtmltopdf.org/usage/wkhtmltopdf.txt

But then I got this:

The switch --footer-left, is not support using unpatched qt, and will be ignored.

What means “unpatched qt”? Wow! It seems that it will be rather hard to get headers and footers into a wkhtmltopdf document!

For the moment I switch back to appypdf as default_build_method for Lino Voga.

Unsupported locale setting

Another little problem occured maybe after upgrading pip:

>>> import locale
>>> locale.setlocale(locale.LC_ALL, '')
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/lib/python2.7/locale.py", line 579, in setlocale
    return _setlocale(category, locale)
locale.Error: unsupported locale setting

I solved this by setting LC_ALL to en_US.utf-8 in /etc/environment (thanks).