Welcome | Get started | Dive | Contribute | Topics | Reference | Changes | More

Partners in Lino Voga

Partners in Lino Voga are polymorphic, i.e. the database has a series of models which are more or less specialized subclasses of a partner.

In Lino Voga we differentiate the following subclasses of Partner:

digraph foo {
  "Partner" -> "Organization"
  "Partner" -> "Person"
  "Partner" -> "Household"
}

Partner lists

Members of partner lists in the demo database.

>>> rt.show(lists.Members)
... 
===== ===== ======================== =================================== ========
 ID    No.   Partner List             Partner                             Remark
----- ----- ------------------------ ----------------------------------- --------
 1     1     Announcements            Bestbank
 2     2     Weekly newsletter        Rumma & Ko OÜ
 3     3     General discussion       Bäckerei Ausdemwald
 4     4     Beginners forum          Bäckerei Mießen
 ...
 101   101   Developers forum         AA Neudorf
 102   102   PyCon 2014               Nisperter Schützenverein
 103   103   Free Software Day 2014   Mehrwertsteuer-Kontrollamt Eupen
===== ===== ======================== =================================== ========
>>> from urllib.parse import quote
>>> url = '/api/lists/Members?'
>>> url += 'limit=20&start=0&fmt=json&'
>>> url += "filter=" + quote('[{"type":"string","value":"3","field":"list"}]')
>>> test_client.force_login(rt.login('robin').user)
>>> res = test_client.get(url, REMOTE_USER='robin')
>>> print(res.status_code)
200
>>> d = json.loads(res.content.decode())
>>> d['count']
14
>>> d['rows'][13]
[None, None, None, None, None, None, None, None, None]