Top "Django-serializer" questions

Django provides serializers for serializing models into common data formats such as JSON and XML.

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. …

django-rest-framework django-serializer
method object is not JSON serializable

I am using ajax to refresh the cart items when cart item is removed. It works well, if i don't …

python django python-3.x django-views django-serializer
How to serialize a one to many relation in django-rest using Model serializer?

These are my models and serializers. I want a representation of Question Model along with a list of people the …

python serialization django-rest-framework one-to-many django-serializer
ModelSerializer is extremely slow in Django REST framework

I am using Django REST framework for my API and yesterday I wanted to see how it works for large …

django django-rest-framework django-orm django-serializer
Unique validation on nested serializer on Django Rest Framework

I have a case like this, where you have a custom nested serializer relation with a unique field. Sample case: …

python django rest django-rest-framework django-serializer
Django Rest Framework PUT request on unique model field

I have the following model class Owner(models.Model): user = models.OneToOneField(User, default=1, editable=True) phone = models.CharField(max_…

django django-models django-rest-framework django-serializer
Invalid data. Expected a dictionary, but got str error with serializer field in Django Rest Framework

I'm using Django 2.x and Django REST Framework. I have two models like class Contact(models.Model): id = models.UUIDField(…

django django-rest-framework django-serializer
how to create serializer for an enum field in django rest framework

i am writing an API in python django rest framework and i am stuck at creating a serializer field for …

django django-models django-rest-framework python-3.6 django-serializer
SerializerClass field on Serializer save from primary key

I am working developing an API with Django-rest-framework and consuming it from a web app. It has a Physician Model …

python django serialization django-rest-framework django-serializer