Skip to content
Snippets Groups Projects
Commit a0842c0e authored by Todd Dembrey's avatar Todd Dembrey
Browse files

Move the content panels onto the Mixin class and reference correctly.

parent 66645f23
No related branches found
No related tags found
No related merge requests found
......@@ -149,8 +149,7 @@ class PersonPage(FundingMixin, BasePage):
InlinePanel('person_types', label='Person types'),
FieldPanel('introduction'),
StreamFieldPanel('biography'),
InlinePanel('funding', label='Funding'),
]
] + FundingMixin.content_panels
class PersonIndexPage(BasePage):
......
......@@ -116,8 +116,7 @@ class ProjectPage(FundingMixin, BasePage):
StreamFieldPanel('body'),
InlinePanel('contact_details', label="Contact Details"),
InlinePanel('related_pages', label="Related Projects"),
InlinePanel('funding', label="Funding"),
]
] + FundingMixin.content_panels
class ProjectIndexPage(BasePage):
......
......@@ -4,6 +4,7 @@ from django.db import models
from wagtail.wagtailadmin.edit_handlers import (
FieldPanel,
FieldRowPanel,
InlinePanel,
MultiFieldPanel,
PageChooserPanel,
StreamFieldPanel,
......@@ -287,8 +288,9 @@ class BaseFunding(Orderable):
class FundingMixin(models.Model):
'''Implements the funding total calculation
You still need to include the InlinePanel('funding') in the child class
You still need to include the content panel in the child class
'''
content_panels = [InlinePanel('funding', label="Funding")]
class Meta:
abstract = True
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment