Working version of adding html_content
This commit is contained in:
parent
0289586811
commit
713f9ca9e3
3 changed files with 7 additions and 4 deletions
|
@ -257,8 +257,6 @@ class ArticlePage(Page):
|
|||
ImageChooserPanel('feed_image'),
|
||||
], heading="Images"),
|
||||
StreamFieldPanel('gallery'),
|
||||
]
|
||||
content_panels = Page.content_panels + [
|
||||
FieldPanel('html_content', classname='full'),
|
||||
]
|
||||
promote_panels = [
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{% load wagtailcore_tags wagtailimages_tags %}
|
||||
{% load wagtailcore_tags wagtailimages_tags custom_filters %}
|
||||
|
||||
{% if page.feed_image %}
|
||||
<div class="image">
|
||||
|
@ -34,7 +34,9 @@
|
|||
{% if page.html_content %}
|
||||
<!-- Any other content -->
|
||||
<div class="article-body">
|
||||
{{ page.html_content|richtext }}
|
||||
{% autoescape off %}
|
||||
{{ page.html_content|ph_html_decode }}
|
||||
{% endautoescape %}
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
|
|
|
@ -109,6 +109,9 @@ TEMPLATES = [
|
|||
'django.contrib.auth.context_processors.auth',
|
||||
'django.contrib.messages.context_processors.messages',
|
||||
],
|
||||
'libraries': {
|
||||
'custom_filters': 'publichealth.home.custom_filters',
|
||||
},
|
||||
},
|
||||
},
|
||||
]
|
||||
|
|
Loading…
Reference in a new issue