aboutsummaryrefslogtreecommitdiff
path: root/webmentions_ssg/forms/validators.py
diff options
context:
space:
mode:
authorDennis Fink2026-10-25 22:26:40 +0100
committerDennis Fink2026-10-25 22:26:40 +0100
commitce802830c37565d325ba2ecc060443550abb1955 (patch)
treeb2cdf65353b1eb28d2c8d394b0dcd24461c4db6c /webmentions_ssg/forms/validators.py
parenta231913ab273f427697f2d27d615b495f6e160bb (diff)
downloadwebmentions-ssg-ce802830c37565d325ba2ecc060443550abb1955.tar.gz
webmentions-ssg-ce802830c37565d325ba2ecc060443550abb1955.zip
refactor(core): simplify configuration keys
Remove the WEBMENTIONS_SSG prefix from application-specific configuration settings and update validators, tasks, and tests to use the shorter names.
Diffstat (limited to 'webmentions_ssg/forms/validators.py')
-rw-r--r--webmentions_ssg/forms/validators.py5
1 files changed, 1 insertions, 4 deletions
diff --git a/webmentions_ssg/forms/validators.py b/webmentions_ssg/forms/validators.py
index 761dc46..990d91a 100644
--- a/webmentions_ssg/forms/validators.py
+++ b/webmentions_ssg/forms/validators.py
@@ -83,10 +83,7 @@ class AllowedHostname:
:param field: Field containing the URL to validate.
:raises ValidationError: If the URL hostname is not configured as allowed.
"""
- if (
- urlsplit(field.data).hostname
- in current_app.config["WEBMENTIONS_SSG_ALLOWED_HOSTNAMES"]
- ):
+ if urlsplit(field.data).hostname in current_app.config["ALLOWED_HOSTNAMES"]:
return
raise ValidationError(self.message or field.gettext("Invalid input."))