Search
 
SCRIPT & CODE EXAMPLE
 

SHELL

django.core.exceptions.ImproperlyConfigured: The SECRET_KEY setting must not be empty

# add SECRET_KEY from terminal (secret_key is collected from django -->settings.py file)
$ export SECRET_KEY='lmrffsgfhrilklg-za7#57vi!zr)ps8)2anyona25###dl)s-#s=7=vn_'
#settings.py
import os
SECRET_KEY = os.environ['SECRET_KEY']
Comment

django.core.exceptions.improperlyconfigured: the secret_key setting must not be empty.

I had the same error and it turned out to be a circular dependency between a module or class loaded by the settings and the settings module itself. In my case it was a middleware class which was named in the settings which itself tried to load the settings.
Comment

PREVIOUS NEXT
Code Example
Shell :: bash view system log info 
Shell :: start redis server 
Shell :: how to see deleted commit git 
Shell :: requires pyqtwebengine<5.13, which is not installed. 
Shell :: create git aliases 
Shell :: linux screen 
Shell :: debian kill open port 
Shell :: how to turn off windows license will expire soon 
Shell :: bash script: permission denied 
Shell :: remove or undo last merge git 
Shell :: check ram type 
Shell :: stop recording shortcut ubuntu 22.04 
Shell :: rename tag git 
Shell :: update linux history editor 
Shell :: Error: Fetching /usr/local/Homebrew/Library/Taps/commands/homebrew-pup failed! 
Shell :: update snap package 
Shell :: git undo rebase 
Shell :: how to stash the newly created files in git 
Shell :: git remove all files from gitignore 
Shell :: install talib linux server 
Shell :: windows cmd schedule shutdown 
Shell :: get ros version 
Shell :: git log for specific file 
Shell :: ubuntu kill specific port 3000 
Shell :: conda install pydub 
Shell :: apt check if package is installed 
Shell :: find user shell 
Shell :: grep specific file 
Shell :: conda check cuda version 
Shell :: bash use cat in sed command 
ADD CONTENT
Topic
Content
Source link
Name
7+3 =