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

Add compatibility with custom user models #13

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

Conversation

ProfessorLogout
Copy link

When using a custom user model the username field may not exist on the model.

Django solves this by having a get_username method on the User model as documented here.

Since this is already required for a working custom user model I think it would be great to adhere to the same interface.

mpirnat added a commit to mpirnat/django-ninja-apikey that referenced this pull request Jul 8, 2023
Thanks to ProfessorLogout in
mawassk#13
for this suggestion.
@lucasrcezimbra
Copy link

I forked the project to implement some features that I needed. Feel free to submit your PR there.

Source: https://github.com/lucasrcezimbra/ninja-api-key
PyPI: https://pypi.org/project/ninja-api-key/

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.

None yet

2 participants