From d0464e870c1a63bd416fca6c494af97960bc9c30 2024-03-20 03:32:44 From: Ben Sturmfels Date: 2024-03-20 03:32:44 Subject: [PATCH] Fix strange issue with ParameterValidator settings When imported at top-level, `settings` was a Python module, rather than a Django settings object. Not sure why. --- diff --git a/conservancy/__init__.py b/conservancy/__init__.py index 348d3d42475a75f8dc2000428ab50857ab4742c2..f3ee315a111fec349512298c05f09b29a3c1734b 100644 --- a/conservancy/__init__.py +++ b/conservancy/__init__.py @@ -1,10 +1,8 @@ import hashlib -from django.conf import settings - - class ParameterValidator: def __init__(self, given_hash_or_params, params_hash_key=None): + from django.conf import settings if params_hash_key is None: self.given_hash = given_hash_or_params else: