I am trying to access settings variables from a custom module that is initialized in settings.
Here’s the code.
AUTH0_CLIENT_ID = "***"
AUTH0_CLIENT_SECRET = "***"
AUTH0_DOMAIN = "***"
AUTH0_AUDIENCE = "***"
AUTH0_ENGINE_INSTANCE = AuthEngine()
In the last line of the code, AuthEngine
tries to fetch all the variables defined before that line. But testing using hasattr
always returns False. In the __init__()
of AuthEngine
, I tried to look at the content of django.conf.settings
and found that none of the variables I defined in the settings
was there.
I guess as the last line of the code above is getting executed, the updated settings are not available to the rest of the files yet. How to get the updated settings?
Thanks!