20131214 (Saturday, 14 December 2013)

Importing contacts data into a Lino application

Started with new module lino.apps.importfilters.

PermissionDenied

Lino is obviously getting more attention. I feel that directly because Internal Server Error messages like the following are getting more frequent:

Exception at /api/polls/MyPolls/-99999
<class 'lino.core.perms.AnonymousUser'> is not a <class 'lino.modlib.users.models.User'> (polls.MyPolls.master_key = 'user')

I guess that such messages are caused when somebody had been playing on a demo site, saved some permalink somewhere, and reused it later, after the session has timed out or the database had been reinitialized.

This was because lino.core.tables.AbstractTable.get_filter_kw() raised a plain Exception in that case. Now it raises a PermissionDenied exception, leading to a “Forbidden” error message (i.e. status code 403).

Better would be status code “400 Bad request” (“The request cannot be fulfilled due to bad syntax”), but that’s available only in Django 1.6 (where it is called SuspiciousOperation) and I currently want to remain usable on earlier Django versions.

EIDReader continued

The EIDReader applet still doesn’t run under Oracle Java, even when I sign the applet using a certificate purchased from GlobalSign.

Most people I asked about this tell me that applets are obsolete anyway, and that I should write my own browser extension.

So I googled once more for “browser extension run local command”, and thanks to Start an external application from a Google Chrome Extension? I found L.C. Klopfenstein’s Open with external application which uses Roque Pinel’s SimpleGet plugin. That latter is discontinued. But both projects might be interesting for me to get started.

Note that even if I get these things to run, I still need to write (and Lino users must install) a local executable which does the actual work of reading the eid card. I’d probably use pssi to do that (see 2013-11-26).