Closed enzofrnt closed 3 months ago
The goal will be to add native support for viewset… Or documentation about it.
@jkarneges Hi, I've come to realize that the modifications I'm implementing in this plugin require the use of Django REST Framework. In your opinion, would it be preferable to maintain two versions of the plugin—one tailored for Django REST Framework and another for setups without it—or should we integrate the Django REST Framework dependency directly into the existing module? Please let me know your thoughts, and I will adjust my proposal accordingly.
I recommand to use the following class and following registering to use django-eventstream with a viewset and a router.
If you want to hard code the used channels :
And with channels choice send from the request :
Maybe add this to the documentation ?