When your Django app raises an exception, Django sends you an email to report you of the error which includes some useful information. That’s great. But there’s one piece of information that would be helpful in debugging but is missing from those emails: locals().
How can I make Django’s error emails include locals()?
Solved it by including
'include_html': 'True',next to'class': 'django.utils.log.AdminEmailHandler',in theLOGGINGsetting insettings.py. Now I get HTML reports via email that contain all of thelocals()info.