================================= 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. :mod:`lino.utils.auth` forgot to set `request.subst_user` to `None` in such cases. Wrote some docstrings in module :mod:`lino.utils.auth`. New class :mod:`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. :class:`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: ======= === ============ =========================== ======== machine ok LO/OOo OS Python ======= === ============ =========================== ======== hoppel ok libreoffice Ubuntu 2.7 lf.org ok openoffice Debian Lenny stable 2.6.6 dsbe - libreoffice Debian Lenny stable 2.6.6 ======= === ============ =========================== ======== To gather more information I added a temporary call to `logging.info` in :meth:`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: inside " traceback when one of the jobs had a remark. :mod:`lino.utils.html2odf` now converts the text formats `` and `` to a style "Emphasis". En passant: `` is no longer converted to "Bold Text" but to "Strong Emphasis". Added some remarks to the jobs generated by the :mod:`lino_welfare.modlib.welfare.fixtures.demo` fixture, and a test case in :ref:`welfare.specs.misc` 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 :class:`lino.core.actions.InstanceAction`. Inaktive Kursanfragen --------------------- Wir brauchen kein neues Feld "Status" einer Kursanfrage, weil es das schon gibt: :class:`lino_welfare.modlib.courses.CourseRequestStates` Was fehlte, war ein weiterer Status "Inaktiv" und dass dass Feld nicht sichtbar war in der :class:`lino_welfare.modlib.courses.PendingCourseRequests`.