kopia lustrzana https://github.com/wagtail/wagtail
add docs for exclude_fields_in_copy
rodzic
2231906ebe
commit
cd924d0948
|
@ -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.
|
||||
|
|
Ładowanie…
Reference in New Issue