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

DRF support #87

Open
jayvdb opened this issue Mar 13, 2022 · 1 comment
Open

DRF support #87

jayvdb opened this issue Mar 13, 2022 · 1 comment

Comments

@jayvdb
Copy link

jayvdb commented Mar 13, 2022

There are a lot of examples of using django-eventstream with django-rest-framework (DRF) views. I wonder if would be acceptable to contribute an example into examples/ which explains how to do this.

This may not be the best usage of django-eventstream, as it would only be a subset of functionality, however there are times when DRF support is extremely important. For example, the more expansive DRF authentication may be needed. Also DRF has support for describing the API endpoints, however there is not (yet) any explicit support for SSE within Swagger/OpenAPI. Some people may feel it is important for the SSE endpoints to be within existing routes managed by DRF, which account for API versioning, language negotiation, and other features.

Also DRF provides well known serialization mechanics, which a project may feel they need to re-use for their SSE. This can be done without the tighter integration of using DRF views.

@jkarneges
Copy link
Member

Hi! That sounds like a great idea. Feel free to send a PR.

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

No branches or pull requests

2 participants