I have a few booleans in my constance live settings that decide whether certain elements are shown in the templates or not.
Let's say I have a variable A in constance and if A then X is visible in the template. Now, if I set A to False in the constance admin, most of the time this is passed on to the views - but on some page reloads the value changes.
I have tried switching from the database backend to the Redis backend but to no success.
Steps to reproduce
Create a boolean A to configure in Constance
Create a views.py where you put:
A universal context dict in which you assign A so that you can just add the dict to any context
Create a simple view that can show you the value of A (a simple HttpResponse with A in context will do)
Run in a docker compose setting
Reload the url for your view a few times (around 10 suffices in my case to make the bug occur with a very high probability)
System configuration
Django version: 4.2.5
Python version: 3.10.12
Django-Constance version: 3.1.0
(All running in a typical docker compose environment)
Describe the problem
I have a few booleans in my constance live settings that decide whether certain elements are shown in the templates or not. Let's say I have a variable
A
in constance andif A then X is visible in the template
. Now, if I setA
toFalse
in the constance admin, most of the time this is passed on to the views - but on some page reloads the value changes. I have tried switching from the database backend to the Redis backend but to no success.Steps to reproduce
A
to configure in ConstanceA
so that you can just add the dict to any contextA
(a simple HttpResponse withA
in context will do)System configuration