I want to make a dynamic sitemap generation on the site (django) simply through a normal view and html template.
class SitemapView(View): def get(self, request): context={ #something } return render(request, 'shop/sitemap.html', context=context) It should be launched at site.ru/sitemap.xml. Accordingly, in urls.py I write:
urlpatterns = [ path('sitemap.xml', SitemapView.as_view(), name='sitemap_view'), ] Django adds a slash at the end, like all other pages. Can I somehow make an exception and not add a slash at the end to this particular address?