Refactor sources and api keys
Instead of having the sources hard-coded, they are moved to a new table in the DB called Sources
.
This approach allows admins to disable sources, modify the api urls etc. Default sources are added with the migration.
In order to have dynamic choices for the classname
column, Django needed to be upgraded to v5.
API keys are moved to a separate table, which allows future expansion without the need for new migrations.
Encryption is used for the keys, django-cryptography
cannot be used because of this. So cryptography
package was used.
For the encryption key a new secret has to be added to the deployment -> update deployment docs.
Edited by Panna Georgina Liptak