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 %}