Remove default value of SECRET_KEY in Django's settings.py (#102)
The default value of SECRET_KEY was hard-coded in the settings.py which would turn out to be used all the time even if people are not forced to change it. So this commit removes that value and instead gets the SECRET_KEY from the environment variable. Closes #99
This commit is contained in:
committed by
Abhilash Raj
parent
525604bac4
commit
39fd5c6b25
@@ -34,6 +34,12 @@ function check_or_create () {
|
||||
# END
|
||||
# }
|
||||
|
||||
# Check if $SECRET_KEY is defined, if not, bail out.
|
||||
if [[ ! -v SECRET_KEY ]]; then
|
||||
echo "SECRET_KEY is not defined. Aborting."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Check if $DATABASE_URL is defined, if not, use a standard sqlite database.
|
||||
#
|
||||
# If the $DATABASE_URL is defined and is postgres, check if it is available
|
||||
|
||||
Reference in New Issue
Block a user