In user_logged_in, user_logged_out and user_login_failed receiver functions (signals/auth_signals.py), argument 'using' is not passed to transaction.atomic(), so execption is raised when multiple databases are used. When I changed with transaction.atomic(): line to with transaction.atomic(using=DATABASE_ALIAS):, all logging events have been successfully written into database.
I suppose this is the issue as in signals/model_signals.py, DATABASE_ALIAS is passed as 'using' argument to transaction.atomic() calls.
In user_logged_in, user_logged_out and user_login_failed receiver functions (signals/auth_signals.py), argument 'using' is not passed to transaction.atomic(), so execption is raised when multiple databases are used. When I changed
with transaction.atomic():
line towith transaction.atomic(using=DATABASE_ALIAS):
, all logging events have been successfully written into database. I suppose this is the issue as in signals/model_signals.py, DATABASE_ALIAS is passed as 'using' argument to transaction.atomic() calls.