trends
: Managing trends¶
The lino_xl.lib.trends
plugin adds functionality for keeping track of
"trending events" in different "areas".
This is a tested document. The following instructions are used for initialization:
>>> import lino
>>> lino.startup('lino_book.projects.avanti1.settings')
>>> from lino.api.doctest import *
>>> from django.db.models import Q
Usage¶
When using this plugin, the application developer should set the
Plugin.subject_model
and add EventsBySubject
to the detail layout of this model.
Reference¶
- class lino_xl.lib.trends.TrendArea¶
Represents a possible choice for the trend_area field of a
TrendStage
.
- class lino_xl.lib.trends.TrendStage¶
-
- subject_column¶
Whether this stage should cause subject column to be added .
A subject column is a virtual column on the
Plugin.subject_model
that shows the date of the first event for a given trend stage and subject.
- class lino_xl.lib.trends.TrendEvent¶
- subject¶
The subject we are talking about.
- user¶
The user who entered this data.
- event_date¶
The date when the subject reached the stage.
- trend_stage¶
Pointer to the
TrendStage
.
- remark¶
A free text field.
- class lino_xl.lib.trends.EventsBySubject¶
Shows all trend events of that subject.
- class lino_xl.lib.trends.TrendObservable¶
Mixin that should be inherited by the
Plugin.subject_model
so that Lino automatically adds virtual columns for each trend stage having