Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

django secure variable

### you can use this approach to secure any variable not only the secret key ###
### 1- in settings.py ###
from decouple import config
SECRET_KEY = config('SECRET_KEY') # replace your line with this line

### 2- add SECRET_KEY into Environmental Variables ###
		### 1- in Development ###
### create a .env file with the following line ###
SECRET_KEY = myKey # replace my key with your key (without quotes)
		### 2- in Production ###
### just add it to your Production System's Environmental Variables ###
 
PREVIOUS NEXT
Tagged: #django #secure #variable
ADD COMMENT
Topic
Name
6+2 =