1
Fork 0

Update section index model to match old

This commit is contained in:
Jake Howard 2016-11-25 21:59:25 +00:00
parent 68b4aaa799
commit 2a39dece31
2 changed files with 9 additions and 2 deletions

View file

@ -1,5 +1,5 @@
# -*- coding: utf-8 -*- # -*- 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 __future__ import unicode_literals
from django.db import migrations, models from django.db import migrations, models
@ -20,7 +20,9 @@ class Migration(migrations.Migration):
name='SectionIndexPage', name='SectionIndexPage',
fields=[ 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')), ('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)), ('intro', wagtail.wagtailcore.fields.RichTextField(blank=True)),
('hide_list', models.BooleanField(default=False)),
], ],
options={ options={
'abstract': False, 'abstract': False,

View file

@ -1,3 +1,4 @@
from django.db import models
from wagtail.wagtailcore.models import Page from wagtail.wagtailcore.models import Page
from wagtail.wagtailcore.fields import RichTextField from wagtail.wagtailcore.fields import RichTextField
from wagtail.wagtailadmin.edit_handlers import FieldPanel from wagtail.wagtailadmin.edit_handlers import FieldPanel
@ -11,8 +12,12 @@ class Entity(Page):
class SectionIndexPage(Entity): class SectionIndexPage(Entity):
name = models.CharField(max_length=250)
intro = RichTextField(blank=True) intro = RichTextField(blank=True)
hide_list = models.BooleanField(default=False)
content_panels = Page.content_panels + [ content_panels = Page.content_panels + [
FieldPanel('intro', classname="full") FieldPanel('name'),
FieldPanel('intro', classname="full"),
FieldPanel('hide_list')
] ]