Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use USERNAME_FIELD to determine which field is used in email templates #84

Open
submarcos opened this issue Nov 9, 2020 · 0 comments
Open
Assignees

Comments

@submarcos
Copy link
Member

submarcos commented Nov 9, 2020

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)

@submarcos submarcos changed the title Use get_username_field to determine which field is used in mail templates Use USERNAME_FIELD to determine which field is used in mail templates Nov 9, 2020
@submarcos submarcos changed the title Use USERNAME_FIELD to determine which field is used in mail templates Use USERNAME_FIELD to determine which field is used in email templates Nov 9, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants