Skip to content

Commit 9d131a2

Browse files
committed
add docs for interchangable keys
1 parent 0f405c6 commit 9d131a2

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

docs/settings.txt

+17
Original file line numberDiff line numberDiff line change
@@ -39,3 +39,20 @@ COMMENT_TIMEOUT
3939

4040
The maximum comment form timeout in seconds. The default value is
4141
``2 * 60 * 60`` (2 hours).
42+
43+
44+
COMMENTS_ID_OVERRIDES
45+
----------------------
46+
47+
.. setting:: COMMENTS_ID_OVERRIDES
48+
49+
A dictionary of ``{"app_label": "id_field"}`` pairs that override the
50+
PK used for referencing comment objects.
51+
52+
If you want to disguise the plain IDs of your referenced model used by the comment form, you can
53+
use uuid field as an ID for the model. You don't have to change the model to use different PK.
54+
For example::
55+
56+
COMMENTS_ID_OVERRIDES = {
57+
"myapp.MyModel": "uuid",
58+
}

0 commit comments

Comments
 (0)