-
Notifications
You must be signed in to change notification settings - Fork 13
Open
Labels
questionFurther information is requestedFurther information is requested
Description
Hello,
I've built the project, added a new field to the HomePage model, and added data via the admin panel.
However, when I'm trying to render {{page.body}} to the template, I get nothing. When I create a child page of the home page, it seems to work. But I need to be able to use all this for my home page. Not sure whats going on :(
models.py
`from wagtail.models import Page
from wagtail.fields import RichTextField
from wagtail.admin.panels import FieldPanel
class HomePage(Page):
body = RichTextField(blank=True)
content_panels = Page.content_panels + [
FieldPanel('body'),
]`
templates/home/home_page.html
`{% extends "base.html" %}
{% load wagtailcore_tags %}
{% block body_class %}template-homepage{% endblock %}
{% block content %}
{{page.title}}
{{ page.body|richtext }}
{% endblock %}`
Metadata
Metadata
Assignees
Labels
questionFurther information is requestedFurther information is requested