Test suites pass again¶
The unit test suite revealed another bug:
INFO 20120103 /api/dsbe/CourseProviders?fmt=json&limit=30&start=0 INFO 20120107 Store <class 'lino.apps.dsbe.models.CourseProvider'> row2list(Company #197 (u'Arbeitsamt der D.G.')) AttributeError: 'Company' object has no attribute 'company_ptr'
This was because Tables are no longer singletons.
The CourseProviders table request received Company objects instead of CourseProvider.
lino.core.table.Table.base_queryset was not None if the
base table had had a request before.
The same effect probably happened for
(at least theoretically… it didn’t become visible)
anyway now we also there make sure to “disconnect”
from the the base class’s _handles instance
by creating a new dict() object for each handle.
Performance is not an issue there since this happens only once
per UI and Table.
Now the test suites for both igen and dsbe pass again.
Added the possibility to specify fields on a related model
through a ForeignKey using Django’s
First use case
class ContractsByUser(Contracts): column_names = 'person person__national_id person__gender applies_from applies_until job id user type *'
TODO: the default value for preferred_width isn’t correct.