diff --git a/project/common/migrations/0001_initial.py b/project/common/migrations/0001_initial.py index 689f3aa..5f551ce 100644 --- a/project/common/migrations/0001_initial.py +++ b/project/common/migrations/0001_initial.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Generated by Django 1.10.3 on 2016-11-24 21:20 +# Generated by Django 1.10.3 on 2016-11-25 21:49 from __future__ import unicode_literals from django.db import migrations, models @@ -20,7 +20,9 @@ class Migration(migrations.Migration): name='SectionIndexPage', fields=[ ('page_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='wagtailcore.Page')), + ('name', models.CharField(max_length=250)), ('intro', wagtail.wagtailcore.fields.RichTextField(blank=True)), + ('hide_list', models.BooleanField(default=False)), ], options={ 'abstract': False, diff --git a/project/common/models.py b/project/common/models.py index a4bf64e..32c62dd 100644 --- a/project/common/models.py +++ b/project/common/models.py @@ -1,3 +1,4 @@ +from django.db import models from wagtail.wagtailcore.models import Page from wagtail.wagtailcore.fields import RichTextField from wagtail.wagtailadmin.edit_handlers import FieldPanel @@ -11,8 +12,12 @@ class Entity(Page): class SectionIndexPage(Entity): + name = models.CharField(max_length=250) intro = RichTextField(blank=True) + hide_list = models.BooleanField(default=False) content_panels = Page.content_panels + [ - FieldPanel('intro', classname="full") + FieldPanel('name'), + FieldPanel('intro', classname="full"), + FieldPanel('hide_list') ]