[Python] .env is not being detected in Django

Discussão em 'Python' iniciado por Stack, Agosto 17, 2025.

  1. Stack

    Stack Membro Participativo

    I have done pip install python-dotenv and then created a .env file in the same folder as the settings.py. The values from the .env is not working.

    settings:

    SECRET_KEY = os.environ.get('SECRET_KEY')


    .env file:

    SECRET_KEY=mysecretkey


    What should I do?

    Continue reading...

Compartilhe esta Página