1
Fork 0

Add homepage tagline to DB

This commit is contained in:
Jake Howard 2018-07-25 08:43:01 +01:00
parent ebb44cc372
commit 29a05febdb
Signed by: jake
GPG Key ID: 57AFB45680EDD477
3 changed files with 21 additions and 2 deletions

View File

@ -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),
),
]

View File

@ -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")

View File

@ -6,7 +6,7 @@
<header id="index-header" class="d-flex align-items-center image" data-image="{% static 'img/header.jpg' %}">
<div class="text-center m-auto text-light">
<h1 class="display-1">{{ settings.WAGTAIL_SITE_NAME|title }}</h1>
<h2 class="lead"></h2>
<h2 class="lead">{{ self.body }}</h2>
</div>
</header>
{% endblock %}