diff options
Diffstat (limited to 'app/posts/build.py')
-rw-r--r-- | app/posts/build.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/app/posts/build.py b/app/posts/build.py index e5dc1ed..89d7c54 100644 --- a/app/posts/build.py +++ b/app/posts/build.py @@ -1,4 +1,5 @@ from django.urls import reverse +from django.test.client import Client from django.apps import apps from builder.base import BuildNew from itertools import chain @@ -176,3 +177,10 @@ class BuildTrips(BuildNew): paginate_by=30 ) self.build_detail_view() + + +class BuildSitemap(BuildNew): + def build(self): + c = Client() + response = c.get('/sitemap.xml', HTTP_HOST='127.0.0.1') + self.write_file('', response.content, 'xml', 'sitemap') |