Django How to call a function inside template with credential arguments?
I have a function which gets all email addresses from a mail server.
Currently I have 3 variables stored in my .env file (host, email and password) for each mail server (I have 3 different) and then writing the function FOR EACH MAILSERVER. On the template, I have 3 buttons that get emails from the 3 mail servers, each button different function.
This was done in testing but now I'd like to have the 3 buttons in my Django template to call just ONE function with different credentials (stored on my .env file).
Is there any way to call one function with different parameters from my django template?