Django-CRM icon indicating copy to clipboard operation
Django-CRM copied to clipboard

Key Error : 'Secret Key'

Open Stanislavnba opened this issue 3 years ago • 3 comments

Hello, I tried to run the CRM. Downloaded it all. installed the requirements.txt in both the file directory and in the virtualenv. I cant run the server thou. When I try to run it this shows up. File "C:\Users\stani\OneDrive\Desktop\Ladyfit Site\Django-CRM-master\crm\settings.py", line 12, in SECRET_KEY = os.environ["SECRET_KEY"] File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.9_3.9.3568.0_x64__qbz5n2kfra8p0\lib\os.py", line 679, in getitem raise KeyError(key) from None KeyError: 'SECRET_KEY'

I searched for this and I dont have .pyc files to delete. I fixed the dotenv import issue and it still doesnt work. Any ideas ?

Stanislavnba avatar Oct 19 '22 15:10 Stanislavnba

I kind of fixed it. Everything that is called from the env.md file cannot be called for some reason. So I just replaced it in the settings.py. But now i have a error 404 when I run the server. So I will try and figure this out now. Do I need some files or data in the DB before I start the server?

Stanislavnba avatar Oct 20 '22 09:10 Stanislavnba

because lib dontenv

just

linux = mv env.md .env win = rename env.md to .env

zoal97 avatar Nov 27 '22 12:11 zoal97

Just copy paste the env.md into .env file. Now project has lots of changes. Please update your repository.

shaikhmudassir0 avatar Oct 09 '23 08:10 shaikhmudassir0