summaryrefslogtreecommitdiff
path: root/app/builder
diff options
context:
space:
mode:
Diffstat (limited to 'app/builder')
-rw-r--r--app/builder/base.py11
1 files changed, 11 insertions, 0 deletions
diff --git a/app/builder/base.py b/app/builder/base.py
index ded8bba..863a4da 100644
--- a/app/builder/base.py
+++ b/app/builder/base.py
@@ -58,6 +58,7 @@ class BuildNew():
Archive Page builder that actually crawls the urls
because we need to be able to pass a request object to the template
"""
+
if not qs:
qs = self.get_model_queryset()
pages = self.get_pages(qs, paginate_by)
@@ -68,6 +69,7 @@ class BuildNew():
else:
path = base_path
url = base_path
+ print(path)
response = self.client.get(url, HTTP_HOST='127.0.0.1')
if page == 0:
self.write_file(base_path, response.content)
@@ -123,6 +125,15 @@ class BuildNew():
response = self.client.get('%s.amp' % url)
self.write_file(path, response.content, ext='amp', filename=slug)
+ def build_feed(self, url_name):
+ """
+ Not called, but available for subclassing
+ """
+ url = reverse(url_name,)
+ path, slug = os.path.split(url)
+ slug, ext = os.path.splitext(slug)
+ response = self.client.get(url, HTTP_HOST='127.0.0.1')
+ self.write_file('%s/' % path, response.content, ext=ext.split(".")[-1], filename=slug)
class Build():