My problem is simple, I have an admin action named "send email":
The problem is, the admin user can call this function twice in a row, probably by clicking "Go" many times; this causes the email to be sent multiple times. Is there a way to prevent it?
I tried to put a timeout in the end of the admin function send_email
but it's not working: it takes 10 seconds between each users, and I have many users.
def send_email(modeladmin, request, queryset):
...
time.sleep(10)