summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--app/pages/build.py4
-rw-r--r--app/pages/migrations/0004_page_build.py20
-rw-r--r--app/pages/models.py1
3 files changed, 23 insertions, 2 deletions
diff --git a/app/pages/build.py b/app/pages/build.py
index f63fd89..e40a218 100644
--- a/app/pages/build.py
+++ b/app/pages/build.py
@@ -13,13 +13,13 @@ class BuildPages(BuildNew):
print("building pages")
def build_essays(self):
- qs = self.model.objects.filter(path="essays")
+ qs = self.model.objects.filter(path="essays",build=True)
c = {'object_list': qs, 'MEDIA_URL': settings.BAKED_MEDIA_URL, 'IMAGES_URL': settings.BAKED_IMAGES_URL}
t = render_to_string('archives/essays.html', c).encode('utf-8')
self.write_file('essays/', t)
def get_model_queryset(self):
- return self.model.objects.all()
+ return self.model.objects.filter(build=True)
def builder():
diff --git a/app/pages/migrations/0004_page_build.py b/app/pages/migrations/0004_page_build.py
new file mode 100644
index 0000000..f318e21
--- /dev/null
+++ b/app/pages/migrations/0004_page_build.py
@@ -0,0 +1,20 @@
+# -*- coding: utf-8 -*-
+# Generated by Django 1.11.5 on 2017-12-29 11:34
+from __future__ import unicode_literals
+
+from django.db import migrations, models
+
+
+class Migration(migrations.Migration):
+
+ dependencies = [
+ ('pages', '0003_page_app'),
+ ]
+
+ operations = [
+ migrations.AddField(
+ model_name='page',
+ name='build',
+ field=models.BooleanField(default=True),
+ ),
+ ]
diff --git a/app/pages/models.py b/app/pages/models.py
index 4d06e7c..dacb25f 100644
--- a/app/pages/models.py
+++ b/app/pages/models.py
@@ -18,6 +18,7 @@ class Page(models.Model):
meta_description = models.CharField(max_length=256, null=True, blank=True)
path = models.CharField(max_length=200, null=True, blank=True)
app = models.CharField(max_length=50, null=True, blank=True)
+ build = models.BooleanField(default=True)
def __unicode__(self):
return self.title