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 FAQ section in README to explain usage of Generics #444

Merged
merged 2 commits into from
Oct 4, 2023

Conversation

browniebroke
Copy link
Contributor

I have made things!

I recently came across the fact that this library adds support for Generics in DRF serializers, which makes type checking a lot better. It might be obvious to the people who are familiar with type checking, but it wasn't obvious to me that this library supported that.

Related issues

Refs #164

Follow up

I think it's also supported for GenericViewSet, but requires a bit more extra setup. If that's correct, I can also add a paragraph/section about that, although I'd like to get feedback on this change first.

README.md Show resolved Hide resolved
@browniebroke
Copy link
Contributor Author

I think it's also supported for GenericViewSet, but requires a bit more extra setup.

I tried to use it in my project but it didn't work. After a quick search, the monkeypatching might not be working so well for DRF, depending on your DRF settings.

From what I understand, it's not properly fixable in any of the projects from the @typeddjango org, and it should be better once DRF 3.15 is out, which will include this change. I suggest to not advertise this feature for views until 3.15 is out, and it will need a note about the minimum version.

@sobolevn
Copy link
Member

Do we have a ETA for the release?

@browniebroke
Copy link
Contributor Author

browniebroke commented Jul 11, 2023

There is a PR open to prepare the release notes. It's been open for a while now and it looks like it's all ready, although some more changes have been merged since it was last updated.

Probably just waiting on a maintainer to find enough free time to do it.

README.md Outdated Show resolved Hide resolved
@intgr intgr self-assigned this Aug 3, 2023
@intgr intgr merged commit 2e3e89c into typeddjango:master Oct 4, 2023
@browniebroke browniebroke deleted the docs/generics branch October 4, 2023 21:24
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.

3 participants