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 the django default user method get_username() in the history for #211

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

BBooijLiewes
Copy link
Contributor

obtaining the username of the user using the get_username method.

This uses the USERNAME_FIELD attribute on the abstract user model class
in order to obtain which user attribute to use as username. For the
default user model it defaults back to username, which is a valid
attribute there. See:

https://docs.djangoproject.com/en/3.2/topics/auth/customizing/#django.contrib.auth.models.AbstractBaseUser.get_username

for more info

To be determined: Do we want to build a test for this ourselves? or are we at that point testing django functionality in django-binder, which could be considered redundant.

obaining the username of the user.

This uses the USERNAME_FIELD attribute on the abstract user model class
in order to obtain which user attribute to use as username. For the
default user model it defaults back to username, which is a valid
attribute there. See
https://docs.djangoproject.com/en/3.2/topics/auth/customizing/#django.contrib.auth.models.AbstractBaseUser.get_username

for more info
@BBooijLiewes BBooijLiewes self-assigned this Feb 28, 2022
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

Successfully merging this pull request may close these issues.

1 participant