How do I get django decouple to use my updated env vars?

337 Views Asked by At

I use DECOUPLE in my Django project and its awesome. However, I recently changed an env variable to a new key and after restarting the server, it still used the old env key. I used a print statement to see the key being used. Does it cache the old one and still use it ? If so, how do I clear it?

My workaround for now is just to rename the key when i update the var.

Any help would be greatly appreciated.

Many thanks

A.

1

There are 1 best solutions below

0
M.Gafaru On

I had the same problem while running project on vscode terminal. I fixed it by running project(manage.py runserver) on the terminal of the my laptop and the updated .env file was loaded.