Top "Django-rest-framework" questions

A powerful and flexible toolkit for building RESTful Web APIs.

Django rest framework serializing many to many field

How do I serialize a many-to-many field into list of something, and return them through rest framework? In my example …

python django django-models django-rest-framework django-serializer
Django Rest Framework Token Authentication

I have read the Django Rest Framework Guides and done all the tutorials. Everything seemed to make sense and work …

python django django-rest-framework
How to register users in Django REST framework?

I'm coding a REST API with Django REST framework. The API will be the backend of a social mobile app. …

django python-2.7 django-models django-rest-framework
How to get Request.User in Django-Rest-Framework serializer?

I've tried something like this, it does not work. class PostSerializer(serializers.ModelSerializer): class Meta: model = Post def save(self): …

django django-rest-framework
Django Rest Framework partial update

I'm trying to implement partial_update with Django Rest Framework but I need some clarification because I'm stuck. Why do …

python django django-rest-framework
Write only, read only fields in django rest framework

I have models like this: class ModelA(models.Model): name = models.CharField() class ModelB(models.Model): f1 = models.CharField() model_…

django django-rest-framework
Django Rest Framework - Could not resolve URL for hyperlinked relationship using view name "user-detail"

I am building a project in Django Rest Framework where users can login to view their wine cellar. My ModelViewSets …

python django django-rest-framework
How to change field name in Django REST Framework

I am trying to change Model field name in DRF Serializer like alias in SQL. I have tried different methods …

django django-rest-framework
Pass extra arguments to Serializer Class in Django Rest Framework

I want to pass some arguments to DRF Serializer class from Viewset, so for I have tried this: class OneZeroSerializer(…

python django rest django-rest-framework