1
votes

Sorry for my poor language usage.

I am using drf for my web api. It has special renderers. I can use django views, or drf pure APIView. I can use TemplateHTMLRenderer which is good but all of them make drf not necessary. Because i want to use drf browsable api features. Using post, put, delete forms. Using json and html in api, less and clean code.

But the problem is, i cant customize browsable api, i cant send extra content or context. For example; i am using serializer for my Post model but also i need another query serializer too. Which they are not related actualy.

Too much talk. My question is; i want to customize browsable api with his features and with more extra data. But i could not see any documant for it.

Thanks.

1

1 Answers

0
votes

This methods are sending data with content in response which is in json data.

https://github.com/encode/django-rest-framework/blob/master/rest_framework/renderers.py#L686-L722

like here. I can use content or view, or forms in my api.html and I want to add more data here. Like;

'mydata': Posts.objects.all(),
'mydata2': Blogs.objects.all(),

and after that, i want to use them in my api.html(or in custom template).