From 0d0d20a59b541cee3b8c8a96ddddc137b10c5acf Mon Sep 17 00:00:00 2001 From: LB Date: Wed, 1 Nov 2017 19:38:49 +0700 Subject: [PATCH] add PageWithExcludedCopyField test model --- wagtail/tests/testapp/models.py | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/wagtail/tests/testapp/models.py b/wagtail/tests/testapp/models.py index b9770e229b..1af432fe6b 100644 --- a/wagtail/tests/testapp/models.py +++ b/wagtail/tests/testapp/models.py @@ -139,6 +139,21 @@ class SimplePage(Page): ] +# Page with Excluded Fields when copied +class PageWithExcludedCopyField(Page): + content = models.TextField() + + # Exclude this field from being copied + special_field = models.CharField(max_length=255, default='Very Special') + exclude_fields_in_copy = ['special_field'] + + content_panels = [ + FieldPanel('title', classname="full title"), + FieldPanel('special_field'), + FieldPanel('content'), + ] + + class PageWithOldStyleRouteMethod(Page): """ Prior to Wagtail 0.4, the route() method on Page returned an HttpResponse