DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
'NAME': os.path.join(BASE_DIR, 'bookingsystem'),
'USER': 'root',
'PASSWORD': '',
'OPTIONS': {
'init_command': "SET sql_mode='STRICT_TRANS_TABLES'"
}
}
}当我进入时:
python manage.py migrate它返回错误:
TypeError: 'init_command' is an invalid keyword argument for this function我希望在我的数据库上创建新的表,但是当我通过XAMPP重新加载phpmyadmin时,没有任何变化。我似乎找不出错误,所以任何帮助都是非常感谢的。
发布于 2021-01-15 06:56:03
只需将'ENGINE': 'django.db.backends.sqlite3'更改为ENGINE': 'django.db.backends.mysql'
https://stackoverflow.com/questions/58274485
复制相似问题