Hi All,

I am using DRF 3.11.0.

I am using model serializer. Here is how my code looks - 

@api_view(['GET'])
def get_all_students(request):
    students = Student.objects.all()
    serializer = StudentSerializer(students, many=True)
    return JsonResponse(serializer.data, safe=False)
    
class Student(models.Model):
    name = models.CharField(max_length=100)
    created = models.DateTimeField(auto_now_add=True)
    
class StudentSerializer(serializers.ModelSerializer):
    class Meta:
        model = Student
        fields = ['name', 'created']

However it just works only if number of students are less than or equal to 
100. If no of students > 100, the request just sits there. I can see the 
query set is getting all records but the request is waiting on 
serializer.data.

I don't understand where that limit is set. Can someone please help.

Thanks!

-- 
You received this message because you are subscribed to the Google Groups 
"Django REST framework" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-rest-framework+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-rest-framework/049c2c88-8097-42cb-b087-2e3388435349o%40googlegroups.com.

Reply via email to