Document the COMMENTS_RELATION_NAME constant in 2.14.2 release notes

pull/7579/head
Matt Westcott 2021-10-14 12:40:42 +01:00
rodzic d3f2305601
commit 20ef0dcf7f
1 zmienionych plików z 10 dodań i 0 usunięć

Wyświetl plik

@ -32,3 +32,13 @@ line to their project settings:
WAGTAIL_COMMENTS_RELATION_NAME = 'wagtail_admin_comments'
This will allow third-party commenting apps to work in Wagtail 2.14.2 alongside Wagtail's admin commenting functionality.
Reusable library code that needs to preserve backwards compatibility with previous Wagtail versions
can find out the relation name as follows:
.. code-block:: python
try:
from wagtail.core.models import COMMENTS_RELATION_NAME
except ImportError:
COMMENTS_RELATION_NAME = 'comments'