https://docs.djangoproject.com/fr/2.2/topics/auth/customizing/#django.contrib.auth.models.CustomUser.USERNAME_FIELD
-
Some django project use another field than username for users (example with email)
-
Django provide a shortcut to use and get value for this.
-
We need to use that to format templates and emails, because some projects will not work properly (terralego apps use email as USERNAME_FIELD)