how to autogenerate context for APIView methods
I need to write my own APIView class which overrides drf’s APIView and it will have autogenerated self.context which I can pass into serializer.
For example
`class SomeView(APIView):
def post(self, request):
why can not post this data in rest_framework django?
I’m encountering an error when testing this code with Postman. Can you help me identify the cause? “AssertionError at /POST_Create_NewInvoiceBuy/
Django FOREIGN KEY constraint failed when registering new users
I’m encountering a “FOREIGN KEY constraint failed” error while trying to register new users in my Django application. Here’s the relevant code from my models.py, serializers.py, and views.py files:
Django REST Framework Route Not Appearing in API List
I’m facing an issue with Django REST Framework where a specific route is not appearing in the API list when I access https://myserver.com/api/. Here’s my setup:
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?