Questions tagged [django-drf-renderer]

21 questions
1
vote
1 answer

DRF not supporting multiple renderer_classes

I'm using Django 2.x and DRF I have a view which returns the binary data in different formats like pdf, eps, etc. To return binary response, I have set the renderer_classes property and my view is class DownloadQRCode(APIView): renderer_classes…
Anuj TBE
  • 9,198
  • 27
  • 136
  • 285
1
vote
0 answers

ListAPIView with JSONRenderer returns text/html

Straightforward question, I am using DRF with a class-based view to serve up an API for consumption by Angular. In particular, I want to respond to a GET request with JSON data that Angular can subscribe to: class…
1
vote
0 answers

How do I render JSON objects in Django template?

I'm trying to move a Django backend to a RESTful API in order to let a mobile app access the backend. I'm using Django REST framework for this. So if I serialize all my models and objects and render in JSON (for mobile app), how do I render the…
0
votes
1 answer

Django Rest Framework ModelViewSet ManyToMany Field override partial_update Method is not working update_or_create

I have a question here I have two models Tag Model class Tag(models.Model): creator = models.ForeignKey(settings.AUTH_USER_MODEL, on_delete=models.CASCADE, related_name='author') name = models.CharField(max_length=100) def…
0
votes
1 answer

Model object has no attribute HyperlinkedRelatedField

I've checked dozens of examples and I think I am doing it the right way, however I am getting this error message 'City' object has no attribute 'store', Please help, see my serializer enclosed. class…
0
votes
0 answers

Django rest framework api end points not accessble after implementing ouath 2 toolkit

My django rest api endpoints were working with the JWT authentication. Later I changed that to Oauth 2 toolkit. All are working fine from postman rest app. But the api doc test endpoints are not working. It shows the following screen. This page…
1
2