Relative Content

Tag Archive for pythondjangodjango-rest-framework

Django REST Framework cached view returning 2 different payloads

I’m experiencing a strange issue with my Django REST Framework paginated list view, which utilizes a 2 hour cache. If I repeatedly make requests to the view’s endpoint, I am sometimes getting Response 1 (x bytes in size) and sometimes getting Response 2 (y bytes in size).

How to retrieve the url of the uploaded image instead of the id?

I have a Django Restfull Application. And a user can upload images from the Admin panel of Django. But the problem I am facing is that in the corresponding api call. The id’s of the images are displayed instead of the url’s of the images. See the api call below-