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

Django Rest_framework Serializer With Inner Relationship

Here part of my models.py: class Discount(models.Model): discount_id = models.AutoField(primary… Read more Django Rest_framework Serializer With Inner Relationship

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

Encountered Unknown Tag 'load'.?

I want to add some custom-template-tags.But, {% load userfilters %} => 'load' tag is not… Read more Encountered Unknown Tag 'load'.?

How Can I Filter Queryset By Checked Form Checkboxes In Django?

I need to update the model according to the marked checkboxes in the django shape How can I get onl… Read more How Can I Filter Queryset By Checked Form Checkboxes In Django?

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

Using Django Rest Framework To Return Info By Name

I am using Django rest framework and I create this class to return all the name of project class c… Read more Using Django Rest Framework To Return Info By Name

How Do I Serialize Specific Field In Django Manytomany Field?

So, I'm trying to use Django Rest Framework for my project. I have two models Category and Cont… Read more How Do I Serialize Specific Field In Django Manytomany Field?

Django Rest Framework Add Class Level Method To Api

I am using Django Rest Framework to create my API. I am using @link to return information about a p… Read more Django Rest Framework Add Class Level Method To Api

Django Permission Required

I'm trying to check permissions for some API requests. I've already set auth users and auth… Read more Django Permission Required

Where To Change The Form Of Json Response In Django Rest Framework?

Lets say I have a model: class MyModel(models.Model): name = models.CharField(max_length=100) … Read more Where To Change The Form Of Json Response In Django Rest Framework?

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?

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

Django Mptt Efficiently Serializing Relational Data With Drf

I have a Category model that is a MPTT model. It is m2m to Group and I need to serialize the tree w… Read more Django Mptt Efficiently Serializing Relational Data With Drf

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 Rest Framework Errors In Trying To Persist An Image

This is my UserProfile object, class UserProfile(models.Model): user = models.OneToOneField(Use… Read more Django Rest Framework Errors In Trying To Persist An Image

Django Rest Framework Currentuserdefault() With Serializer

I have been trying for a while now to add an 'owner' field to my models. I have looked at o… Read more Django Rest Framework Currentuserdefault() With Serializer

Setting Up Django Setting.py With Mysql Database

Im using mysql in my windows7 for a year and its working fine. I recently know about django and try… Read more Setting Up Django Setting.py With Mysql Database

Update/append Serializer.data In Django Rest Framework

How can I update/append serializer.data in Django Rest Framework? data = serializer.data.update({&#… Read more Update/append Serializer.data In Django Rest Framework

Data Is Not Expected In Nested Serializer

I m making a post request. but the data is not giving me as expected. views.py @api_view(['POST… Read more Data Is Not Expected In Nested Serializer

Django Rest Framework Upload File To A Method

So i have been trying to upload a file to a method using DRF with no luck so far. I was able to upl… Read more Django Rest Framework Upload File To A Method