我刚开始使用Django项目,在项目的settings.py文件中,daabase部分如下所示:
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.
}
}
Run Code Online (Sandbox Code Playgroud)
无论如何,我不需要输入明文密码,但可能以某种加密形式输入密码?
我如何用两个相反的值分割字符串?例如(
,它)
是"deliminators",我有以下字符串:
Wouldn't it be (most) beneficial to have (at least) some idea?
Run Code Online (Sandbox Code Playgroud)
我需要以下输出(作为数组)
["Wouldn't it be ", "most", " beneficial to have ", "at least", " some idea?"]
Run Code Online (Sandbox Code Playgroud)