django-rest-framework-xml icon indicating copy to clipboard operation
django-rest-framework-xml copied to clipboard

Update renderers.py

Open pschaffl opened this issue 2 years ago • 0 comments

The proposed changes allow to create child classes that include a namespace or other root attributes, e.g.

class UrlXmlRenderer(XMLRenderer):
    root_tag_name = 'urlset'
    item_tag_name = 'url'
    root_attributes = {'xmlns': 'http://www.sitemaps.org/schemas/sitemap/0.9'}

pschaffl avatar Nov 26 '22 09:11 pschaffl