Use TemplateResponse in django.contrib.sitemaps
|Reported by:||Mathieu Pillard||Owned by:||nobody|
|Has patch:||yes||Needs documentation:||no|
|Needs tests:||yes||Patch needs improvement:||no|
Like it was done for the admin in #15008 , it would be useful to convert django.contrib.sitemaps views to TemplateResponse, in order to help apps/projects re-use it while adding some stuff in the context.
For instance, the django-news-sitemaps news_sitemap() view is almost a straight copy/paste from django.contrib.sitemaps.views.sitemap(), just adding a couple items in the context (and changing a couple other lines but that's a different issue)
Attached is a very simple patch that does exactly that, passing all current tests.