Skip to content
Advertisement

I want to know why secret_key is wrong

I’m making website using Python Framework of ‘Django’.

I have some problems with Django about secret_key .

When I set a secret_key in .env file on private and change settings.py, there is problem.

I’m trying to solve it by myself, but its so difficult.

When I runserver on django, It errors contain:

JavaScript

settings.py contains:

JavaScript

.env contains:

JavaScript

Advertisement

Answer

if your .env file is in root project directory so you don’t have to put this

JavaScript

just write this only environ.Env.read_env(), it will work

User contributions licensed under: CC BY-SA
4 People found this is helpful
Advertisement