Monday, December 5, 2016¶
Except for the code changes below, today I “wasted my time” and did nothing else but reviewing the Lino Hosting Guide.
Getting Lino Psico to work¶
I continued to work on #897.
I had an AttributeError 'Person' object has no attribute
'standby'
when opening a table of partners. The a traceback ended
with:
...
File ".../lino/core/boundaction.py", line 139, in get_bound_action_permission
if not self.action.get_action_permission(ar, obj, state):
File ".../lino_noi/lib/clocking/actions.py", line 113, in get_action_permission
if obj.standby or obj.closed:
Yes, of course. This was because in Lino Psico we use partners
instead of tickets as the
lino_noi.lib.clocking.Plugin.ticket_model
.
Solution was to define a new class
lino_noi.lib.clocking.mixins.Workable
with a
Before pushing this to master, I ran the test suite and discovered a few trivial failures caused by the fact that certain warning messages no longer pass unseen (see Friday, December 2, 2016).
Note that you cannot simply call
django.utils.timezone.make_aware()
on every timestamp to be
stored in a DateTimeField. You must check whether USE_TZ
is True, otherwise you may get a SQLite backend does not
support timezone-aware datetimes when USE_TZ is False.