Barcode widget for Person fields
I would like to implement a barcode widget. The idea is that dashboard widgets can be created that present a selected Person
model field (or additional field) as a barcode (with the barcode format beingconfigurable).
An example use case is non-secure applicaitons, like cantines, that simply authenticate a person with a static barcode (like the MensaMax system does).
I think is is simple enogh to add it to the core.
Implementation notes
-
Select a barcode library that supports 1D and 2D barcodes, and can generate a barcode as SVG from a string -
Add the dependency to pyproject.toml
-
Create a new DashboardWidget
subclass for the widget with a reasonable name -
The widget should have two extra fields: -
which field of the Person
model should go into the barcode (you can usePerson.syncable_fields
to get a list of all fields, cf. https://edugit.org/AlekSIS/official/AlekSIS-App-LDAP/-/blob/master/aleksis/apps/ldap/util/ldap_sync.py#L126 -
What format the barcode should be rendered in (support some of the most popular 1D and 2D barcode types – maybe you can generate the choices from the list of supported code types of your barcode library?)
-
Edited by Nik | Klampfradler