Steps to reproduce

I have 2 model , a user have multiple cars.

class User(Model):
          id = AutoField()
         name = CharField()

class Car(Model):
        id = AutoField()
       name = CharField()
       user = ForeignkeyField(User)

and two serializer for the 2 model

class UserSerilizer():
       car_set = CarSerilizer(many=True)
        class Meta:
                field = ('name', 'car_set')

Expected behavior

when I serializers the user with the cars.
it return all the cars associated with the user.
..but I only want to show top 2 cars..
Actual behavior

I want to limit the cars in the car set...how can I do that with 
serilizer...

-- 
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 [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to