summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--app/builder/base.py6
-rw-r--r--app/builder/views.py3
-rw-r--r--design/templates/admin/buttons.html3
3 files changed, 8 insertions, 4 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)))
diff --git a/app/builder/views.py b/app/builder/views.py
index 7804630..5988e1f 100644
--- a/app/builder/views.py
+++ b/app/builder/views.py
@@ -68,6 +68,9 @@ def do_build(request):
elif section == 'dailyphotos':
context = {'message': 'Writing daily photo pages to Disk'}
dailybuilder()
+ elif section == 'discursivepages':
+ context = {'message': 'Writing Discursive Meditation Pages to Disk'}
+ BuildPages("pages", "page", 'discursivemeditation.com').build()
return render(request, 'admin/message.html', context)
diff --git a/design/templates/admin/buttons.html b/design/templates/admin/buttons.html
index afdc2d9..4b169ea 100644
--- a/design/templates/admin/buttons.html
+++ b/design/templates/admin/buttons.html
@@ -47,6 +47,7 @@
<li class="item"><a href="/admin/build/build?id=lttr_archive">Build Newsletter</a></li>
<li class="item"><a href="/admin/build/build?id=guide">Build Guide</a></li>
<li class="item"><a href="/admin/build/build?id=pages">Build Pages</a></li>
+ <li class="item"><a href="/admin/build/build?id=discursivepages">Build Discursive Pages</a></li>
<li class="item"><a href="/admin/build/build?id=fieldnotes">Build FieldNotes</a></li>
<li class="item"><a href="/admin/build/build?id=essays">Build Essays</a></li>
<li class="item"><a href="/admin/build/build?id=buildbooks">Build Books</a></li>
@@ -54,8 +55,6 @@
<li class="item"><a href="/admin/build/build?id=pubs">Build Publications</a></li>
<li class="item"><a href="/admin/build/build?id=resume">Build Resume</a></li>
<li class="item"><a href="/admin/build/build?id=src">Build src</a></li>
- <li class="item"><a href="/admin/build/build?id=luxphotos">Build Private Galleries</a></li>
- <li class="item"><a href="{% url 'admin:upload_zip'%}">Upload Photos</a></li>
</ul>
</div>
</div>