We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
TokenAuthentication
From django-silk profiling,
if not auth_token.user.is_active:
is causing a query like:
SELECT "api_user"."id", "api_user"."password", "api_user"."last_login", "api_user"."is_superuser", "api_user"."username", "api_user"."first_name", "api_user"."last_name", "api_user"."email", "api_user"."is_staff", "api_user"."is_active", "api_user"."date_joined" FROM "api_user" WHERE "api_user"."id" = 1 LIMIT 21
this can be potentially be optimized using select_related.
select_related
The text was updated successfully, but these errors were encountered:
Another idea could be a way by which user can configure the select_related field for request.user on the TokenAuthentication class.
request.user
Reference: https://stackoverflow.com/a/65924551/10534470
Sorry, something went wrong.
Fixes #15, #16: allow select_related | tests for permissions, auth …
dc1c398
…modules (#17)
Successfully merging a pull request may close this issue.
From django-silk profiling,
is causing a query like:
this can be potentially be optimized using
select_related
.The text was updated successfully, but these errors were encountered: