我得到错误
OperationalError: unable to open database file
通向我的 .db 文件的路径是
~/Development/Django/django_prac/practice/database
这是我的 Settings.py
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3', # Add 'postgresql_psycopg2', 'mysql', 'sqlite3' or 'oracle'.
'NAME': '/Home/Development/Django/django_prac/practice/database/practice.db', # Or path to database file if using sqlite3.
# The following settings are not used with sqlite3:
'USER': '',
'PASSWORD': '',
'HOST': '', # Empty for localhost through domain sockets or '127.0.0.1' for localhost through TCP.
'PORT': '', # Set to empty string for default.
}
}
我也试过
~/Development/Django/django_prac/practice/database$
在我的“NAME”中,但发生同样的错误