python - How to change the root element and list-item elements name? (django-rest-framework) -
I am new to django-rest-framework. Sampling like I am
& Lt; Root & gt; & Lt; List Items & gt; Worrier1 & lt; / List item & gt; & Lt; List Items & gt; Worrier2 & lt; / List item & gt; & Lt; Root & gt;
What do I need
& lt; Hero & gt; & Lt; Worrier1 & gt; Worrier1 & lt; / Worrier1 & gt; & Lt; Worrier2 & gt; Worrier2 & lt; / Worrier2 & gt; & Lt; Hero & gt;
These are hardcoded values, so you get the only chance, create a custom renderer By overriding XMLRenderer
(which will actually be the whole class) and use that custom renderer in your view.
Comments
Post a Comment