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

Set configured user model as request.user #651

Merged
merged 4 commits into from
Aug 13, 2024

Conversation

flaeppe
Copy link
Member

@flaeppe flaeppe commented Aug 13, 2024

Uses the placeholder _UserModel from django-stubs to hook in to its plugin to get the configured model.

Related issues

Uses the placeholder `_UserModel` from `django-stubs` to hook in to its
plugin to get the configured model.
@flaeppe
Copy link
Member Author

flaeppe commented Aug 13, 2024

This fixes the supertype issue, but I'm not sure what to make of the other one with the proxy model. I suppose a type: ignore[...] might be reasonable there since it actually is a property in DRF

Copy link
Member

@sobolevn sobolevn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you! I think that UserModel should be in django-stub-ext. It should be public.

@sobolevn sobolevn merged commit c79e32c into typeddjango:master Aug 13, 2024
12 checks passed
@flaeppe flaeppe deleted the fix/request-user branch August 13, 2024 09:04
@flaeppe
Copy link
Member Author

flaeppe commented Aug 13, 2024

Yes indeed. I think it should be public too

kalekseev added a commit to kalekseev/djangorestframework-stubs that referenced this pull request Aug 24, 2024
kalekseev added a commit to kalekseev/djangorestframework-stubs that referenced this pull request Oct 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

New mypy failures on djangorestframework-stubs after django-stubs update
2 participants