20130423 (Tuesday, 23 April 2013)

‘WSGIRequest’ object has no attribute ‘subst_user’

I finally looked up why I received often a series of error messages “‘WSGIRequest’ object has no attribute ‘subst_user’” from the demo sites. These server tracebacks were caused by html HEAD requests issued by my own monitor. lino.utils.auth forgot to set request.subst_user to None in such cases. Wrote some docstrings in module lino.utils.auth. New class lino.utils.auth.AuthMiddleWareBase.

User message when contract type empty

The type field of lino_welfare.isip.Contract and lino_welfare.jobs.Contract is declared blank=True but null=False. Which is what we want: if the user submits an empty value for this field, Lino should fill a default value before saving it. But in some cases Lino cannot determine a default value. In this cases, the user saw only a message “Server-side failure” instead of something meaningful which says that she just forgot to fill in the “Contract type” field. lino_welfare.modlib.isip.models.ContractBase now raises ValidationErrror “You must specify a contract type.” Optimizations in :mod:lino.ui.views` and :mod:lino.ui.store`.

.pdf table doesn’t always render

welfare.jobs.NewJobsOverview implements the new user-requested layout and works very well… on hoppel and on lf.org, but not on cpaseupen.

Here is a table with some first observations:














Debian Lenny stable




Debian Lenny stable


To gather more information I added a temporary call to logging.info in lino.utils.appy_pod.Renderer.insert_table().

Ha! The problem had nothing to do with the LO or OOo version but with the fact that the production site wanted to render some italic text. And that wasn’t yet supported. Printing the document welfare.jobs.NewJobsOverview caused a “NotImplementedError: <i> inside <text:p>” traceback when one of the jobs had a remark.

lino.utils.html2odf now converts the text formats <i> and <em> to a style “Emphasis”.

En passant: <b> is no longer converted to “Bold Text” but to “Strong Emphasis”.

Added some remarks to the jobs generated by the lino_welfare.modlib.welfare.fixtures.demo fixture, and a test case in Miscellaneous so that this is now covered by the test suite.

This testcase required a little change in EmptyTableRow: For Actions of an EmptyTable it wasn’t yet possible to access the lino.core.actions.InstanceAction.

Inaktive Kursanfragen

Wir brauchen kein neues Feld “Status” einer Kursanfrage, weil es das schon gibt: lino_welfare.modlib.courses.CourseRequestStates

Was fehlte, war ein weiterer Status “Inaktiv” und dass dass Feld nicht sichtbar war in der lino_welfare.modlib.courses.PendingCourseRequests.