add PageWithExcludedCopyField test model

pull/4012/head
LB 2017-11-01 19:38:49 +07:00 zatwierdzone przez Matt Westcott
rodzic 36d06ae105
commit 0d0d20a59b
1 zmienionych plików z 15 dodań i 0 usunięć

Wyświetl plik

@ -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