我正在尝试使用Sqlite3和Python 2.7向Django项目添加数据库.
这就是我的setting.py的样子:
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3', # Add 'postgresql_psycopg2', 'mysql', 'sqlite3' or 'oracle'.
'NAME': 'dev.db', # Or path to database file if using sqlite3.
'USER': '', # Not used with sqlite3.
'PASSWORD': '', # Not used with sqlite3.
'HOST': '', # Set to empty string for localhost. Not used with sqlite3.
'PORT': '', # Set to empty string for default. Not used with sqlite3.
}
}
Run Code Online (Sandbox Code Playgroud)
它允许我创建数据库,它要求我创建超级用户:
You just installed Django's auth system, which means you …Run Code Online (Sandbox Code Playgroud)