(Sorry, I can not comment on Danhip) This is a wotked solution for me (mySQL), I added Peter code in the DATABASE field:
DATABASES = { 'default': { (...) 'OPTIONS': { (...), "init_command": "SET storage_engine=INNODB, SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED" }, } }
source share