Wednesday, March 11, 2015

When reading eID cards

Discovered #127 and #128.

Fixed #127 and added two lines in lino_welfare.projects.std.tests.test_beid to test it.

Sphinx 1.3 has been released

Takayuki Shimizukawa has released a new version of Sphinx. I converted the documentation for atelier to the new Alabaster theme which I have been using before e.g. in German Lino Welfare user documentation and which has the advantage of being responsive. But there is one open question before I can use it for the Lino docs: how can I get the “previous | next | modules | index” links that used to be in the upper right corner? Not urgent.

Checking primary addresses

I fixed #127, but how can we set the primary flag for the address of card holders that have been read from eID cards until now?

  • I adapted the get_primary_address method.

  • New test module lino.projects.min2.tests.test_addresses.

Now a first approach can be to write a local script to be executed with the pm run command:

from lino.api.shell import *
for p in contacts.Partner.objects.all():
    p.get_primary_address(update=True)

Tidying up the API

Above script motivated me to finally do another API change: rename lino.api.runtime to lino.api.shell.

And that caused me to remove finally those backwards-compatibility modules lino.runtim, lino.ad and lino.rt.

The script in the previous section with old API would have been:

from lino.runtime import *

Now it is:

from lino.api.shell import *