I use an Azure VM, mysqlclient==1.4.6, Django==2.1.5
My code in admin.py:
from django.db import transaction ... try: with transaction.atomic():