From 1231f7b0d4fff93758efaf1371a1dd4c6661f0a5 Mon Sep 17 00:00:00 2001 From: Standa Platil Date: Sun, 6 Dec 2020 22:49:07 +0100 Subject: [PATCH] blog --- blog/models.py | 5 ----- blog/templates/blog/blog_index_page.html | 23 ++++++++++++++++------- 2 files changed, 16 insertions(+), 12 deletions(-) diff --git a/blog/models.py b/blog/models.py index 547168f..a188482 100644 --- a/blog/models.py +++ b/blog/models.py @@ -29,11 +29,6 @@ class BlogPage(Page): else: return None - search_fields = Page.search_fields + [ - index.SearchField('intro'), - index.SearchField('body'), - ] - content_panels = Page.content_panels + [ FieldPanel('date'), FieldPanel('intro'), diff --git a/blog/templates/blog/blog_index_page.html b/blog/templates/blog/blog_index_page.html index bb6b843..3214b64 100644 --- a/blog/templates/blog/blog_index_page.html +++ b/blog/templates/blog/blog_index_page.html @@ -1,18 +1,27 @@ {% extends "base.html" %} -{% load wagtailcore_tags %} +{% load wagtailcore_tags wagtailimages_tags %} {% block body_class %}template-blogindexpage{% endblock %} {% block content %} -

{{ page.title }}

+

{{ page.title }}

{{ page.intro|richtext }}
- {% for post in page.get_children %} -

{{ post.title }}

- {{ post.specific.intro }} - {{ post.specific.body|richtext }} - {% endfor %} +
+ {% for post in page.get_children %} +
+ {% image post.specific.image width-250 class="card-img-top" %} +
+
{{ post.specific.title }}
+

{{ post.specific.intro }}

+
+ +
+ {% endfor %} +
{% endblock %} \ No newline at end of file