How to I hide my secret_key using virtualenv and Django?

后端 未结 4 1690
没有蜡笔的小新
没有蜡笔的小新 2020-12-29 08:12

I am using Django, python, virtualenv, virtualenvwrapper and Vagrant.

So far I h

4条回答
  •  被撕碎了的回忆
    2020-12-29 09:04

    The solution I use is to create a file sec.py and place it next to my settings.py file. Then in at line 1 of settings.py call from .sec import *. Be sure to include the period in front of the file name. Be sure to list sec.py in your .gitignore file.

提交回复
热议问题