summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonathan DeMasi <jrdemasi@gmail.com>2020-03-08 12:48:42 -0600
committerJonathan DeMasi <jrdemasi@gmail.com>2020-03-08 12:48:42 -0600
commit74ff789b5c6625804124971b5045f7cae49ff238 (patch)
tree938a7dfbe0cd788cbebd53056563a91cd789265a
parent3f3a20777f08152730b6de8ce8df657cf518f138 (diff)
downloadjthanio-74ff789b5c6625804124971b5045f7cae49ff238.tar
jthanio-74ff789b5c6625804124971b5045f7cae49ff238.tar.gz
jthanio-74ff789b5c6625804124971b5045f7cae49ff238.tar.bz2
jthanio-74ff789b5c6625804124971b5045f7cae49ff238.tar.lz
jthanio-74ff789b5c6625804124971b5045f7cae49ff238.tar.xz
jthanio-74ff789b5c6625804124971b5045f7cae49ff238.tar.zst
jthanio-74ff789b5c6625804124971b5045f7cae49ff238.zip
clean up some locations of things
-rw-r--r--blog/models.py3
-rw-r--r--blog/templates/blog/blog_index_page.html11
2 files changed, 3 insertions, 11 deletions
diff --git a/blog/models.py b/blog/models.py
index d53fb64..e34ca58 100644
--- a/blog/models.py
+++ b/blog/models.py
@@ -24,7 +24,8 @@ class BlogIndexPage(Page):
def get_context(self, request):
# Update context to include only published posts, ordered by reverse-chron
context = super().get_context(request)
- blogpages = self.get_children().live().order_by('-first_published_at')
+ # We have to add the type because we want tags and categories to live under blog
+ blogpages = self.get_children().live().order_by('-first_published_at').type(BlogPost)
paginator = Paginator(blogpages, 5)
# Try to get the ?page=x value
page = request.GET.get("page")
diff --git a/blog/templates/blog/blog_index_page.html b/blog/templates/blog/blog_index_page.html
index 3a36238..d58d1a9 100644
--- a/blog/templates/blog/blog_index_page.html
+++ b/blog/templates/blog/blog_index_page.html
@@ -60,21 +60,12 @@
</li>
{% endif %}
{% endif %}
-
</div>
<!-- Sidebar Widgets Column -->
<div class="col-md-4">
-
{% include "search.html" %}
-
-
</div>
-
- </div>
- <!-- /.row -->
-
- </div>
-
+ </div>
</div>
{% endblock %}