============================ Saturday, September 20, 2014 ============================ Two API changes --------------- Oops, here is an API change which caused me some code changes. But I think it was worth the work because it makes things *much* more clear. And there is hope that other developers didn't yet use it very much since it was not yet documented clearly: I added a new module :mod:`lino.rt` and moved the following functions and objects from :mod:`lino.dd` to it: - :func:`rt.startup` - :attr:`rt.models` - :func:`rt.login` - :func:`rt.show` And then I did another thing which had been waiting in my mind for quite some time: - The objects stored in :attr:`rt.models` are no longer :class:`AttrDict ` instances but the :xfile:`models.py` modules themselves. My general impression is that this makes Lino more beautiful because it is "one strange thing less". This change should officially not influence any code, but there exceptions when it comes to hackerish usages. For example certain tested tutorial documents (like :lino:`/tutorials/tables/index`) used a trick to put the names of models and tables to the global namespace: >>> from lino.api.shell import * >>> globals().update(tables) This hack has become different: >>> from lino.api.shell import * >>> globals().update(tables.__dict__) Remote fields failed on empty values ------------------------------------ Discovered and fixed a bug in Lino which occured in :ref:`faggio`. After creating a new room, I got the following console message, and the list of rooms no longer appeared at all:: [20/Sep/2014 20:20:44] "GET /api/cal/Rooms/-99999?_dc=1411233644184&an=insert&rp=ext-comp-2235&fmt=json HTTP/1.1" 200 426 ERROR 'NoneType' object has no attribute 'city' Traceback (most recent call last): File "/home/luc/hgwork/lino/lino/core/model.py", line 150, in func obj, ar) File "/home/luc/hgwork/lino/lino/ui/store.py", line 191, in full_value_from_object return getattr(obj, self.name) AttributeError: 'NoneType' object has no attribute 'city' WARNING AjaxExceptionResponse: AttributeError 'str' object has no attribute 'pk' Wrote a new test case to reproduce this: :ref:`voga.tested.cal`. The reason was a bug in :class:`lino.core.fields.RemoteField` triggered by the `company__city` column in the :class:`ml.cal.Rooms` list (but only the :ref:`faggio` variant of it.