diff --git a/db.sqlite3 b/db.sqlite3 index 729173c..91c6c83 100644 Binary files a/db.sqlite3 and b/db.sqlite3 differ diff --git a/home/__pycache__/models.cpython-38.pyc b/home/__pycache__/models.cpython-38.pyc index 96ec817..26cc265 100644 Binary files a/home/__pycache__/models.cpython-38.pyc and b/home/__pycache__/models.cpython-38.pyc differ diff --git a/home/migrations/0003_homepage_body.py b/home/migrations/0003_homepage_body.py new file mode 100644 index 0000000..628fc0e --- /dev/null +++ b/home/migrations/0003_homepage_body.py @@ -0,0 +1,19 @@ +# Generated by Django 3.1.3 on 2020-11-19 19:58 + +from django.db import migrations +import wagtail.core.fields + + +class Migration(migrations.Migration): + + dependencies = [ + ('home', '0002_create_homepage'), + ] + + operations = [ + migrations.AddField( + model_name='homepage', + name='body', + field=wagtail.core.fields.RichTextField(blank=True), + ), + ] diff --git a/home/migrations/__pycache__/0003_homepage_body.cpython-38.pyc b/home/migrations/__pycache__/0003_homepage_body.cpython-38.pyc new file mode 100644 index 0000000..9612e99 Binary files /dev/null and b/home/migrations/__pycache__/0003_homepage_body.cpython-38.pyc differ diff --git a/home/models.py b/home/models.py index af7b579..6484420 100644 --- a/home/models.py +++ b/home/models.py @@ -1,7 +1,12 @@ from django.db import models - from wagtail.core.models import Page +from wagtail.core.fields import RichTextField +from wagtail.admin.edit_handlers import FieldPanel class HomePage(Page): - pass + body = RichTextField(blank=True) + + content_panels = Page.content_panels + [ + FieldPanel('body', classname="full"), + ] diff --git a/home/templates/home/home_page.html b/home/templates/home/home_page.html index db9e9b0..7a8c6d6 100644 --- a/home/templates/home/home_page.html +++ b/home/templates/home/home_page.html @@ -1,21 +1,15 @@ {% extends "base.html" %} -{% load static %} +{% load wagtailcore_tags %} {% block body_class %}template-homepage{% endblock %} {% block extra_css %} -{% comment %} -Delete the line below if you're just getting started and want to remove the welcome screen! -{% endcomment %} - + {% endblock extra_css %} {% block content %} -{% comment %} -Delete the line below if you're just getting started and want to remove the welcome screen! -{% endcomment %} -{% include 'home/welcome_page.html' %} + {{ page.body|richtext }} {% endblock content %}