Good afternoon I ran into the problem that the data on the page with json is not displayed.
models
class Example (models.Model):
Text = models.TextField(null=True)
def __str__(self):
return self.Text[0:50]
serializers
class ExampleSerializer(ModelSerializer):
class Meta:
model= Example
fields='__all__'
View
class ExampleAPI(viewsets.ModelViewSet):
queryset= Dictionary.objects.all()
serializer_class = ExampleSerializer
def get_paginated_response(self, data):
return Response(data)
url
routExample= routers.SimpleRouter()
routExample.register(r'ExampleAPI', views.ExampleAPI)
urlpatterns = [
path("ExampleAPI/", include(routExample.urls)),
]
But the data is still not displayed
but they are present in admin
And even the linked model has data in json format