summaryrefslogtreecommitdiff
path: root/app/builder/base.py
diff options
context:
space:
mode:
Diffstat (limited to 'app/builder/base.py')
-rw-r--r--app/builder/base.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/app/builder/base.py b/app/builder/base.py
index 04a92ce..7b99c58 100644
--- a/app/builder/base.py
+++ b/app/builder/base.py
@@ -15,7 +15,9 @@ class _FileWriter(object):
"""
Given a path and text object; write the page to disc
"""
- def __init__(self, path, text_object, ext='html', filename='index', base_path=settings.FLATFILES_ROOT):
+ def __init__(self, path, text_object, ext='html', filename='index', site='luxagraf.net'):
+ site = Site.objects.get(domain=site)
+ base_path = os.path.join(settings.PROJ_ROOT, site.domain)
self.path = '%s%s' % (base_path, path)
if not os.path.isdir(self.path):
os.makedirs(self.path)
@@ -49,7 +51,7 @@ class BuildNew():
return self.model.objects.filter(status__exact=1)
def write_file(self, path, text_object, ext='html', filename='index'):
- self.writer = _FileWriter(path, text_object, ext=ext, filename=filename)
+ self.writer = _FileWriter(path, text_object, ext=ext, filename=filename, site=self.site)
def get_pages(self, qs, paginate_by):
return int(ceil(Decimal(qs.count()) / Decimal(paginate_by)))