Skip to content

Commit f322a04

Browse files
authored
Merge pull request #13943 from valentijnscholten/tag-slug-truncate
tags: allow setting tag truncate length
2 parents ed8317e + 466c28f commit f322a04

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

dojo/settings/settings.dist.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,8 @@
9292
DD_CELERY_PASS_MODEL_BY_ID=(str, True),
9393
DD_CELERY_LOG_LEVEL=(str, "INFO"),
9494
DD_TAG_BULK_ADD_BATCH_SIZE=(int, 1000),
95+
# Tagulous slug truncate unique setting. Set to -1 to use tagulous internal default (5)
96+
DD_TAGULOUS_SLUG_TRUNCATE_UNIQUE=(int, -1),
9597
# Minimum number of model updated instances before search index updates as performaed asynchronously. Set to -1 to disable async updates.
9698
DD_WATSON_ASYNC_INDEX_UPDATE_THRESHOLD=(int, 10),
9799
DD_WATSON_ASYNC_INDEX_UPDATE_BATCH_SIZE=(int, 1000),
@@ -1875,6 +1877,11 @@ def saml2_attrib_map_format(din):
18751877
# using 'element' for width should take width from css defined in template, but it doesn't. So set to 70% here.
18761878
TAGULOUS_AUTOCOMPLETE_SETTINGS = {"placeholder": "Enter some tags (comma separated, use enter to select / create a new tag)", "width": "70%"}
18771879

1880+
# Configure tagulous slug truncate unique setting if provided
1881+
# If not set (value is -1), tagulous will use its internal default value of 5
1882+
if (truncate_unique := env("DD_TAGULOUS_SLUG_TRUNCATE_UNIQUE")) != -1:
1883+
TAGULOUS_SLUG_TRUNCATE_UNIQUE = truncate_unique
1884+
18781885
EDITABLE_MITIGATED_DATA = env("DD_EDITABLE_MITIGATED_DATA")
18791886

18801887
# FEATURE_FINDING_GROUPS feature is moved to system_settings, will be removed from settings file

0 commit comments

Comments
 (0)