From 29a05febdbb38646d2908d4b3d99bc7b2e75ea64 Mon Sep 17 00:00:00 2001 From: Jake Howard Date: Wed, 25 Jul 2018 08:43:01 +0100 Subject: [PATCH] Add homepage tagline to DB --- .../home/migrations/0004_auto_20180725_0741.py | 18 ++++++++++++++++++ project/home/models.py | 3 ++- templates/home/home_page.html | 2 +- 3 files changed, 21 insertions(+), 2 deletions(-) create mode 100644 project/home/migrations/0004_auto_20180725_0741.py diff --git a/project/home/migrations/0004_auto_20180725_0741.py b/project/home/migrations/0004_auto_20180725_0741.py new file mode 100644 index 0000000..fa96ae5 --- /dev/null +++ b/project/home/migrations/0004_auto_20180725_0741.py @@ -0,0 +1,18 @@ +# Generated by Django 2.0.7 on 2018-07-25 07:41 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('home', '0003_auto_20180724_1934'), + ] + + operations = [ + migrations.AlterField( + model_name='homepage', + name='body', + field=models.CharField(max_length=255), + ), + ] diff --git a/project/home/models.py b/project/home/models.py index 4882ee4..2a13760 100644 --- a/project/home/models.py +++ b/project/home/models.py @@ -2,12 +2,13 @@ from wagtail.core.models import Page from wagtail.core.fields import RichTextField from wagtail.admin.edit_handlers import FieldPanel from project.common.models import Entity +from django.db import models class HomePage(Entity): is_home = True - body = RichTextField() + body = models.CharField(max_length=255) content_panels = Entity.content_panels + [ FieldPanel('body', classname="full") diff --git a/templates/home/home_page.html b/templates/home/home_page.html index 8bea904..c346047 100644 --- a/templates/home/home_page.html +++ b/templates/home/home_page.html @@ -6,7 +6,7 @@

{{ settings.WAGTAIL_SITE_NAME|title }}

-

+

{{ self.body }}

{% endblock %}