Introduction

rest_framework_channels is the enhanced modules for REST WebSockets using django channels.

You can use serializers and queryset in rest_framework in rest_framework_channels. Also, we are ready for similar permissions and generics too.

Note

We use the below model and serializer as example here.

class TestModel(models.Model):
    """Simple model to test with."""

    title = models.CharField(max_length=255)
    content = models.CharField(max_length=1024)

class TestSerializer(ModelSerializer):
    class Meta:
        model = TestModel
        fields = '__all__'