I would like to have a function on my app where people are notified when the expiry date of a drug is approaching. Like 2 months before it expires. I am currently using smtp for my emails but I would need help writing a view for this and signals.py
Asked
Active
Viewed 117 times
1
-
You could set up a cron job to run a python script which will query the database and send the relevant emails, if needed. The [trick](https://stackoverflow.com/a/40402223/2996101) is done with: `echo 'import myscript' | python manage.py shell` – raratiru Jan 07 '22 at 18:43