3👍
✅
You have to remove / and + like this
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
'NAME': BASE_DIR + 'db.sqlite3',
}
}
4👍
The tutorial you are following has used a pathlib.Path
object for BASE_DIR
which supports the /
operator for joining paths. You need to either use pathlib
or use os.path.join
if you use strings
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
'NAME': os.path.join(BASE_DIR, 'db.sqlite3'),
}
}
- [Django]-Web Dev. Framework for RAD Web App Dev. in Shortest Time ( Yii vs. Django )
- [Django]-Django : CSRF verification failed even after adding {% csrf_token %}
Source:stackexchange.com