|
@@ -1,5 +1,6 @@
|
|
|
from __future__ import unicode_literals
|
|
|
|
|
|
+from django.contrib.contenttypes.fields import GenericRelation
|
|
|
from django.db import models
|
|
|
from django.utils.translation import gettext as _
|
|
|
from modelcluster.fields import ParentalKey
|
|
@@ -67,6 +68,22 @@ class Person(
|
|
|
related_name="+",
|
|
|
)
|
|
|
|
|
|
+ workflow_states = GenericRelation(
|
|
|
+ "wagtailcore.WorkflowState",
|
|
|
+ content_type_field="base_content_type",
|
|
|
+ object_id_field="object_id",
|
|
|
+ related_query_name="person",
|
|
|
+ for_concrete_model=False,
|
|
|
+ )
|
|
|
+
|
|
|
+ revisions = GenericRelation(
|
|
|
+ "wagtailcore.Revision",
|
|
|
+ content_type_field="base_content_type",
|
|
|
+ object_id_field="object_id",
|
|
|
+ related_query_name="person",
|
|
|
+ for_concrete_model=False,
|
|
|
+ )
|
|
|
+
|
|
|
panels = [
|
|
|
MultiFieldPanel(
|
|
|
[
|
|
@@ -163,6 +180,14 @@ class FooterText(
|
|
|
|
|
|
body = RichTextField()
|
|
|
|
|
|
+ revisions = GenericRelation(
|
|
|
+ "wagtailcore.Revision",
|
|
|
+ content_type_field="base_content_type",
|
|
|
+ object_id_field="object_id",
|
|
|
+ related_query_name="footer_text",
|
|
|
+ for_concrete_model=False,
|
|
|
+ )
|
|
|
+
|
|
|
panels = [
|
|
|
FieldPanel("body"),
|
|
|
PublishingPanel(),
|