summaries (summaries plugin in Lino Seggi)

The summaries plugin is used in Lino Seggi to create the candidates. A candidate is when a given user has been votred a number of times to a given board.

A tested document

This is a tested document. The following instructions are used for initialization:

>>> from lino_seggi.projects.seggi1.startup import *

Candidates by board

>>> board = seats.Board.objects.get(pk=1)
>>> board
Board #1 ('Riigikogu')
>>> rt.show(seats.CandidatesByBoard, board)
======================= ===========
 Delegate                num votes
----------------------- -----------
 Annette Arens           3
 Laurent Bastiaensen     3
 Charlotte Collard       3
 Josef Jonas             3
 Laura Laschet           3
 Edgar Engels            2
 Henri Hilgers           2
 Hildegard Hilgers       2
 Marc Malmendier         2
 Hans Altenberg          1
 Andreas Arens           1
 Marc Chantraine         1
 Ulrike Charlier         1
 Dorothée Demeulenaere   1
 Daniel Dericum          1
 Berta Ernst             1
 Eberhart Evers          1
 Bernd Evertz            1
 Luc Faymonville         1
 Irene Ingels            1
 Karl Kaivers            1
 Josefine Leffin         1
 Melissa Meessen         1
 Rando Roosi             1
 **Total (24 rows)**     **38**
======================= ===========

Candidates by user

>>> user = users.User.objects.get(username='robin')
>>> rt.show(seats.CandidatesByUser, user)
No data to display
>>> user = users.User.objects.get(first_name='Annette')
>>> rt.show(seats.CandidatesByUser, user)
=========== ===========
 Board       num votes
----------- -----------
 Riigikogu   3
=========== ===========