From 813446c568bdb7d8832528e1f9f7469053738814 Mon Sep 17 00:00:00 2001 From: Ben Sturmfels Date: Thu, 26 Oct 2023 13:09:50 +1100 Subject: [PATCH] Remove CONSERVANCY_SECRET_KEY Use SECRET_KEY instead to minimise use of non-standard settings. --- conservancy/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conservancy/__init__.py b/conservancy/__init__.py index a1dc7528..348d3d42 100644 --- a/conservancy/__init__.py +++ b/conservancy/__init__.py @@ -9,7 +9,7 @@ class ParameterValidator: self.given_hash = given_hash_or_params else: self.given_hash = given_hash_or_params.get(params_hash_key) - seed = getattr(settings, 'CONSERVANCY_SECRET_KEY', '').encode('utf-8') + seed = settings.SECRET_KEY.encode('utf-8') self.hasher = hashlib.sha256(seed) if isinstance(self.given_hash, str): self.hash_type = type(self.given_hash)