You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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)
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)
templates/home/home_page.html
`{% extends "base.html" %}
{% load wagtailcore_tags %}
{% block body_class %}template-homepage{% endblock %}
{% block content %}
{% endblock %}`
The text was updated successfully, but these errors were encountered: