Why Django API serializer.data return the data empty?
I have a strange issue with my Django API I created a Model called States My serializer has printed the data well but the serializer.data printing the data like the attached screen
How to do daily and Hourly task in django
I use Django 4.2.11 and I try to run a task hourly (or multiple task).
How to Assign Existing Contacts to a Task Using Postman in Django Rest Framework Without Duplicating Email
I am currently working on a project using Django Rest Framework and Postman. My objective is to assign existing contacts to a task. However, when I make a POST request via Postman, I receive the error: “contact with this email already exists”
Why is the data not displayed in django rest framework?
Good afternoon I ran into the problem that the data on the page with json is not displayed.
Why my def perform_update() doesn’t work in Django rest framwrok?
i want when user update a data of leave request django will send email to supervisor of that user
Django DRF how do I display not user: 1, but user_id: 1 when sending serialize.data
I came from FastAPI and Laravel and I’m more used to seeing the foreign key id as user_id rather than just user and the like, how can this be done?
How to get the body from the POST request correctly in the Django Rest Framework
All I want is to get the body from my request, but I don’t understand how to do it, I tried request.data but it returns a string, after I tried using json.loads(request.data), but it just refused to work. I just want to parse the nested json, why is it so difficult in Django.
Creating foreign fields in Django right after the object creation
I am getting a JSON input with the fields description
and choices
for a Question
model. The Choice
model also has a foreign key field pointing to Question
with a related name of choices
. However, in the JSON, the Choice
will come without the question_id
field, in order to be assigned after the creation of the Question
Is it possible customize drf api root and grappeli in a Django Project?
I am using Django Rest Framework and Grappelli in my Django project.
How to access fields of a table that is a foreign key to another in django rest api
I am writing dhango rest api.