Closed taldcroft closed 2 years ago
One possibility could be to replace this statement
if 'manvrs' not in locals():
by this one:
from django.conf import settings
from django.utils.functional import empty
if settings._wrapped is empty:
I have not tested the gist from #201 yet, but I think it would work and it does not break the local server functionality.
We could make this change and also add an issue/PR in django to add a method to django.utils.functional.LazyObject that wraps the functionality. Something like:
def is_set(self):
return self._wrapped is not empty
This would be exactly the same thing, but at least it would be part of the public interface of the class, and perhaps it helps in keeping it working in future versions.
actually, that method I proposed last does not work. It causes the same error, because LazyObject.__getattr__
calls self._setup()
. I still don't know how this ends up causing that specific error.
I just checked that the first solution I proposed works. Now the question is whether we want to go with it. I am creating a PR for that.
202 seems to break the basic local server testing functionality: