Is there a way to 'concatenate' a raw sitemap.xml with the generated in django sitemaps?

15 Views Asked by At

Django has a built in sitemaps app that create a sitemap.xml, but I need to integrate with another django project that has it's own sitemap.xml.

So, the idea it's to make a call to https:another-django-project/sitemap.xml and with that xml 'append' to my django project sitemap.xml and use that as sitemap.

There are 2 projects, in different containers, works like one site(one Web, one Wagtail) mysite.com.

So, in mysite.com/sitemap.xml should return all info from both

I've tried to implement the class WebSitemap(DjangoSitemap): and override something like 'generate_xml()' so I could make a http call to the another application and append the xml, but that doesn't exist.

I've tried to make my own view that calls the django sitemaps programmatically, make a call to the another application xml, concatenate and return. doesn't look a good approach.

how can I do that?

0

There are 0 best solutions below