Open spookylukey opened 1 year ago
I found the answer, you have to do configurations.setup()
. It would be nice if this was documented, thanks!
I think the author writes this in https://django-configurations.readthedocs.io/en/latest/patterns.html#standalone-scripts, maybe the doc can add a common scenario which it replaces django.setup()
for configurations to be activated.
I have scripts that start like this:
When attempting to run this, I get:
I couldn't find documentation for how to get this working with django-configurations. The docs talk about cases that use
execute_from_command_line
, but I don't want/need to use that here. Is there a way to get this to work?Thanks!