Uploads with expiration date management

In Lino Presto we use the lino_xl.lib.uploads plugin to manage certificates that were considered for assigning the price category of a client. These documents are issued by other institutions. When registering a new order, the office worker usually checks whether the category is still correct based on the expiry date of the relevant uploaded documents. They have an upload shortcut “tariff certificate”

This document is part of the Lino test suite and has been tested using doctest. You can re-play the instructions on this page in the demo project, either interactively in a Django shell session or by writing a script and run it using run. Read also the general documentation about Doctests in Lino. The following instructions are used for initialization:

>>> import lino
>>> lino.startup('lino_presto.projects.noereth.settings.doctests')
>>> from lino.api.doctest import *

Here are the default values for the MyExpiringUploads table:

>>> dd.plugins.uploads.expiring_start
0
>>> dd.plugins.uploads.expiring_end
365

The demo_coach is the user who uploaded all demo uploads.

>>> dd.plugins.clients.demo_coach
'martha'
>>> rt.show(rt.models.uploads.Shortcuts)
================================== ==================== ============================
 Wert                               name                 Text
---------------------------------- -------------------- ----------------------------
 presto.Client.id_document          id_document          Identifizierendes Dokument
 presto.Client.income_certificate   income_certificate   Einkommensbescheinigung
================================== ==================== ============================