Questions tagged [django-rest-framework]
A powerful and flexible toolkit for building RESTful Web APIs. Django is a high-level Python Web framework that encourages rapid development and clean, pragmatic design. Built by experienced developers, it takes care of much of the hassle of Web development, so you can focus on writing your app without needing to reinvent the wheel. It’s free and open source.
To create class for get account function
is_allow_notify = serializers.BooleanField(required=True)
how to use rest_framework_simplejwt with email for token?
username_field = User.EMAIL_FIELD
I'm using this plugin to send push notifications from my Django REST app.
It works fine for the android side but IOs are unable to receive any notifications. ...
This is my serializer class
model = Project
exclude = ['deleted_at']
This is Models.py
Here is my model:
name = models.CharField(max_length=250)
age = models.IntegerField()
status = models.IntegerField()
And the serializer is :...
I am working on user authentication on my app using django-rest-auth. I also want to be able to connect to my custom model when the user is signing up with Google and Facebook signup to populate the ...
I am using ExpanderSerializerMixin as follows:
model = State
fields = ['name', 'population']
I have created REST API in django. For frontend i am using Angular framework.
In django my site for showing all the data is 'http://127.0.0.1:8000/flightschedule/'.
Now for angular in routing module ...
image_number = models.CharField(max_length=20)
title = models.CharField(max_length=20)
image_url = models.URLField(max_length=200,null=True,...
Django doesn't login my user. I'm using a Django REST call to do this:
permission_classes = 
def post(self, request, *args, **kwargs):
if request.method == 'POST':
page_size = 3
page_size_query_param = 'page_size'
max_page_size = 5
Is there a way to create a serializer using the User model that shows the locations stored under that user?
I can create regular location serializers, however, I want to be able to create a url like ...
I make tests for my API. When I run two tests I get error apps.users.models.DoesNotExist: User matching query does not exist. in line self.user = User.objects.get(pk=48) on the second test. But if I ...
Structure of project
self.user = User.objects.get(id=3)