add docs for exclude_fields_in_copy

pull/4012/head
LB 2017-11-01 19:37:14 +07:00 zatwierdzone przez Matt Westcott
rodzic 2231906ebe
commit cd924d0948
1 zmienionych plików z 12 dodań i 0 usunięć

Wyświetl plik

@ -189,6 +189,18 @@ In addition to the model fields provided, ``Page`` has many properties and metho
Controls if this page can be created through the Wagtail administration. Defaults to True, and is not inherited by subclasses. This is useful when using `multi-table inheritance <https://docs.djangoproject.com/en/1.8/topics/db/models/#multi-table-inheritance>`_, to stop the base model from being created as an actual page.
.. attribute:: exclude_fields_in_copy
An array of field names that will not be included when a Page is copied.
Useful when you have relations that do not use `ClusterableModel` or should not be copied.
.. code-block:: python
class BlogPage(Page):
exclude_fields_in_copy = ['special_relation', 'custom_uuid']
The following fields will always be excluded in a copy - `['id', 'path', 'depth', 'numchild', 'url_path', 'path']`.
.. attribute:: base_form_class
The form class used as a base for editing Pages of this type in the Wagtail page editor.