Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Setting Up A RichText Content Area
{# templates/blog/blog_post_page.html #}
{% extends 'base.html' %}
{% load wagtailcore_tags %}
{% block content %}
{{ self.richtext|richtext }}
{% endblock content %}
"""Blog page in blog/models.py."""
from wagtail.admin.edit_handlers import FieldPanel, RichTextField
from wagtail.core.models import Page
class BlogPostPage(Page):
"""A blog page class. This is a demo class."""
template = "blog/blog_post_page.html"
richtext = RichTextField()
content_panels = (
FieldPanel("title", classname="full title"),
FieldPanel("richtext"),
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.