Skip to content Skip to sidebar Skip to footer
Showing posts with the label Django Rest Framework

How To Fix A Deprecation Warning In Django 1.9

I am a new user of the Django Framework. I am currently building a REST API with the django_rest_fr… Read more How To Fix A Deprecation Warning In Django 1.9

Writable Nested Serializers User And User Profile Doesn't Work

I'm trying to create a user registration endpoint through django rest framework with his profil… Read more Writable Nested Serializers User And User Profile Doesn't Work

How To Change Wagtail's Default Language?

I'm using headless Wagtail and want to change the default backend language to Portuguese (pt-pt… Read more How To Change Wagtail's Default Language?

I Am Sending Json Data To Api But Getting Unicode Json Data Whe Api Call From Android Device

My data -: {'op':'merge','merge_bcards_ids':{'data':[216,217]},'… Read more I Am Sending Json Data To Api But Getting Unicode Json Data Whe Api Call From Android Device

Django-rest-framework - Autogenerate Form In Browsable Api?

Not sure if i'm using the right vocabulary. In the browsable api that comes for free with djang… Read more Django-rest-framework - Autogenerate Form In Browsable Api?

Convert Sql Query To Django Query

I am trying to convert sql query to django query but failed to do this, can anyone help me select i… Read more Convert Sql Query To Django Query

Create() Argument After ** Must Be A Mapping, Not List, Django Rest Framework (implementing My Own Create Method Error)

when I am implementing this code-example on the documentation (I had to implement the create method… Read more Create() Argument After ** Must Be A Mapping, Not List, Django Rest Framework (implementing My Own Create Method Error)

Django-filter With Drf - How To Do 'and' When Applying Multiple Values With The Same Lookup?

This is a slightly simplified example of the filterset I'm using, which I'm using with the … Read more Django-filter With Drf - How To Do 'and' When Applying Multiple Values With The Same Lookup?

Bookmarking Function Django/python

I'm looking to create a model for users to bookmark a recipe. I have the below: models.py class… Read more Bookmarking Function Django/python

How Can I Add Field In Serializer?

Below is my serializer.py file: from rest_framework import serializers class TaskListSerializer(s… Read more How Can I Add Field In Serializer?

Error While Saving Image Using Django Rest Framework With Angularjs

I have two models Blogs, Photo. In Photo model I have fields 'blogs' as foreign key to Blog… Read more Error While Saving Image Using Django Rest Framework With Angularjs

Django Attribute Error 'datetime.timedelta' Object Has No Attribute 'decode'

I am using a simple generic view of django-rest-framework that is working fine on my local machine … Read more Django Attribute Error 'datetime.timedelta' Object Has No Attribute 'decode'

Custom Function Which Performs Create And Update On Drf Modelviewset

Hi there I want to create a custom method in a modelviewset which needs to perform a save and an up… Read more Custom Function Which Performs Create And Update On Drf Modelviewset

How To Use Django Rest Serializers?

So, after reading the Django REST Framework document, and a bunch of tutorials, I am still having t… Read more How To Use Django Rest Serializers?

Django Drf - How To Do Csrf Validation With Token Authentication

I am working on REST API using Django and Django Rest Framework. In the front-end I have AngularJs … Read more Django Drf - How To Do Csrf Validation With Token Authentication

Merge Django's Auth_user With Existing User Table

Currently I have a legacy app which refers to a user table with all the custom fields. Since there … Read more Merge Django's Auth_user With Existing User Table

The Queryset Attribute Of Django Rest Api Generic Views

I am trying to understand the django rest framework generic API views, the documentation tells me t… Read more The Queryset Attribute Of Django Rest Api Generic Views

Django Rest Framework : Nested Serializer Dynamic Model Fields

I have defined serializers like below. I'm using a mixin to change the display fields on the fl… Read more Django Rest Framework : Nested Serializer Dynamic Model Fields

Drf - Raise Exception If Any Defined Field Is None

I need to serialize model to JSON. Then send this JSON to one API. But this API requires some field… Read more Drf - Raise Exception If Any Defined Field Is None

Proper Usage Of "callable Default Function" In Django Rest Framework (drf)

Question: How can I access the serializer instance or any relevant arguments in the default callabl… Read more Proper Usage Of "callable Default Function" In Django Rest Framework (drf)