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

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

Does Django Rest Framework Have Third Party Apps To Auto Generate Swagger.yaml File?

I have large amount of API endpoints written in django-rest-framework and it keeps increasing and u… Read more Does Django Rest Framework Have Third Party Apps To Auto Generate Swagger.yaml File?

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 To Integrate Getaccesstoken With Fetch Function To Load Data From Drf Backend To React Frontend?

React newbie here, but proficient in Django.I have a simple fetch function which worked perfectly b… Read more How To Integrate Getaccesstoken With Fetch Function To Load Data From Drf Backend To React Frontend?

Django Serializers Vs Rest_framework Serializers

What is the difference between Django serializers vs rest_framework serializers? I making a webapp,… Read more Django Serializers Vs Rest_framework Serializers

Dynamically Exclude Or Include A Field In Django Rest Framework Serializer

I have a serializer in Django REST framework defined as follows: class QuestionSerializer(serialize… Read more Dynamically Exclude Or Include A Field In Django Rest Framework Serializer

How To Use Query Parameters In Django Swagger Documentation?

Let's assume that we have for example such URL - localhost:8000/object?name=STH. Anyone have an… Read more How To Use Query Parameters In Django Swagger Documentation?

How Do I Create A View Different Than The Model With Django-rest-framework

So, I have this 2 classes of servers and datacenters; class Datacenter(models.Model): name = … Read more How Do I Create A View Different Than The Model With Django-rest-framework

Django-oauth-toolkit : Customize Authenticate Response

I am new to Django OAuth Toolkit. I want to customize the authenticate response. My authenticate ur… Read more Django-oauth-toolkit : Customize Authenticate Response

How To Change Serialized Json Structure Django Rest Framwork

I'm wondering if it possible to change structure of my JSON that im sedinding out. currenyly it… Read more How To Change Serialized Json Structure Django Rest Framwork

Post Related Fields Django Rest Framework

new at django. What I am trying to do is POSTING a model which has a OneToOneField property. How do… Read more Post Related Fields Django Rest Framework

Django : How To Access Current Logged In User's Id In Javascript?

I have defined a get_queryset method in a viewset. class BooksViewSet(ReadOnlyModelViewSet): se… Read more Django : How To Access Current Logged In User's Id In Javascript?

Different Validation In Drf Serializer Per Request Method

Lets say i have a model like so: class MyModel(models.Model): first_field = models.CharField() … Read more Different Validation In Drf Serializer Per Request Method

Drf Serialize Arrayfield As String

I have a Model with an ArrayField tags and I need it to serialize back and forth as a string of val… Read more Drf Serialize Arrayfield As String

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?

Httpresponse Django Does Not Change File Name

I had followed 3 of answers: Generating file to download with Django Make Django return response as… Read more Httpresponse Django Does Not Change File Name

Django Send Authenticated User To Another Django Server With The Same Db

I know question sounds strange, I will explain it here. I have two Django servers which share the s… Read more Django Send Authenticated User To Another Django Server With The Same Db

Tools To Coverage Tests Django Rest Framework

I am studying TDD and developing an API in Django Rest Framework, and I had a need that I researche… Read more Tools To Coverage Tests Django Rest Framework

Django Rest Framework Doesn't Display Value In Put Form

Yesterday I posted a question and found a solution to that problem. The solution however caused ano… Read more Django Rest Framework Doesn't Display Value In Put Form

Filtering In Django Rest Framework

In my project I use django rest framework. To filter the results I use django_filters backend. Ther… Read more Filtering In Django Rest Framework