You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
I can't import django_redis.cache.RedisCache to extend it, because the module access django.conf.settings on import time.
To Reproduce
$ python -c "import django_redis.cache"
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "./lib/python3.11/site-packages/django_redis/cache.py", line 12, in <module>
DJANGO_REDIS_SCAN_ITERSIZE = getattr(settings, "DJANGO_REDIS_SCAN_ITERSIZE", 10)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "./lib/python3.11/site-packages/django/conf/__init__.py", line 87, in __getattr__
self._setup(name)
File "./lib/python3.11/site-packages/django/conf/__init__.py", line 67, in _setup
raise ImproperlyConfigured(
django.core.exceptions.ImproperlyConfigured: Requested setting DJANGO_REDIS_SCAN_ITERSIZE, but settings are not configured. You must either define the environment variable DJANGO_SETTINGS_MODULE or call settings.configure() before accessing settings.
The text was updated successfully, but these errors were encountered:
Describe the bug
I can't import
django_redis.cache.RedisCache
to extend it, because the module accessdjango.conf.settings
on import time.To Reproduce
The text was updated successfully, but these errors were encountered: