Monday, December 4, 2017¶
I wrote a new table
lino.modlib.about.SiteSearch. Works as
expected (though I expect performance issues on a normal production
site, but these will have to be coped independently of the site-wide
search anyway). About the API: I tried a model mixin
Searchable but that seems overkill. Should we require app
developers to explicitly register every model? No, rather register
all models by default. But then we must give some possibility for
removing (or not registering) a model. A new model class attribute
lino.core.model.Model.show_in_site_search seems the most
I started a new specs page search : Add search functionality.
Aha, a little bug: the ledger.MatchRule model has no char field at all, and Lino currently returns always all objects for this model, independently of the search text.
It is time to review the API for specifying custom quick_search behaviour.
>>> from lino import startup >>> startup('lino_extjs6.projects.team6.settings.demo') >>> from lino.api.doctest import * >>> rt.models.tickets.Ticket.quick_search_fields frozenset(['ref', 'description', 'summary']) >>> rt.models.tickets.Ticket.quick_search_fields_digit frozenset([u'id'])