Category "django-serializer"

Django dumpdata serializing an int as string

I've been trying to make a custom class/type, defined in a separate db.py file, to be properly serialized as an int when doing a manage.py dumpdata command, but

The response content must be rendered before it can be iterated over. Django Rest Framework

I have a Cart model and Cartserializers. I am trying to do that is if cart defects exist in the cart and then update the cart by increasing the quantity of cart

How to get data that belongs to specific user in Django Rest Framework?

I haved Format_List model with relation with Django user and now I want to get the data belongs to specific user by giving user id or after user login. models.p

Need to do POST method for the Nested serializers using django

models.py class Organisation(models.Model): """ Organisation model """ org_id = models.AutoField(unique=True, primary_key=True) org_name = m

Serializing reverse relationship of a ForeignKey with a DRF ModelSerializer

I'm trying to generate a data structure following this sample: [ { "name": "groupname", "key": "grouping1", "base_templates": [ { "i

How to dynamically remove fields from serializer output

I'm developing an API with Django Rest framework, and I would like to dynamically remove the fields from a serializer. The problem is that I need to remove them