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

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

How Can I Filter A Manytomanyfield Against The Current User In The Browsable Api In Drf?

I have 2 models, Todo and a Tag. Todo has a ManyToMany relationship with Tag. When adding new Todos… Read more How Can I Filter A Manytomanyfield Against The Current User In The Browsable Api In Drf?

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'.?

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

Attributeerror: Module 'django.contrib.auth.views' Has No Attribute 'login'

I got error on my django rest framework, I am running it on windows 10 OS. this is the entire error… Read more Attributeerror: Module 'django.contrib.auth.views' Has No Attribute 'login'

Django Foreignkey Field Required Despite Blank=true And Null=true

I am using Django REST Framework and I have a MyNodel with a related MyOtherModel in a many-to-one … Read more Django Foreignkey Field Required Despite Blank=true And Null=true

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

Serializing One Field From A Manytomanyfield Drf

I have been lot of posts, the DRF documentation (which needs LOT of love), and I couldn't find … Read more Serializing One Field From A Manytomanyfield Drf

Error: ' No Module Named 'django.core.urlresolvers'

I am trying to create web services using the Django REST Framework. While running the server, when … Read more Error: ' No Module Named 'django.core.urlresolvers'

Django Rest Framework And Combining Models

Updated question I was able to get it to work and have updated the codes below. But now my question… Read more Django Rest Framework And Combining Models

Paginating A List Returned By A Viewset In Django Rest Framework

I have created a ViewSet class with a overridden list method like this: from rest_framework.respons… Read more Paginating A List Returned By A Viewset In Django Rest Framework

Filter Json Records In Django Rest Framework

I created a DRF API endpoint in order to be able to grab some data to my database and show it on my… Read more Filter Json Records In Django Rest Framework

How To Use Login_required In Django Rest View

I am trying to use a custom login url in specific view @login_required(login_url='/account/logi… Read more How To Use Login_required In Django Rest View

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)

Can't Access My Laptop's Localhost Through An Android App

So I did a research before posting this and the solutions I found didn't work, more precisely: … Read more Can't Access My Laptop's Localhost Through An Android App

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

Json Parsing Django Rest Framework

I want to parse incoming POST data in django views.py file POST data: { 'number' : '17… Read more Json Parsing Django Rest Framework

How To Exclude Non-active Users From Queryset In Django

I want to exclude non-active users from my project. example 1: url:users/1/friends/ will show all… Read more How To Exclude Non-active Users From Queryset In Django

Not Null Constraint Failed On Nested Serializer Due To "unable Do Get Repr For Queryset Class" Error

Trying to get basic Messaging functionality working in my DRF project. I seem to have a problem wit… Read more Not Null Constraint Failed On Nested Serializer Due To "unable Do Get Repr For Queryset Class" Error