我刚开始学习Django项目,在该项目的settings.py
文件中,数据库部分如下:
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.mysql', # Add 'postgresql_psycopg2', 'mysql', 'sqlite3' or 'oracle'.
'NAME': 'blogengine', # Or path to database file if using sqlite3.
# The following settings are not used with sqlite3:
'USER': 'blogadmin',
'PASSWORD': 'blog@123',
'HOST': 'localhost', # Empty for localhost through domain sockets or '127.0.0.1' for localhost through TCP.
'PORT': '3306', # Set to empty string for default.
}
}
有没有一种方式,我不需要以明文形式输入密码,而是可以以某种加密形式输入?