Django TypeError: argument of type ‘PosixPath’ is not iterable

Make sure that you imported os in project-level settings.py:

import os

Add following in DATABASES within settings.py:

'NAME': os.path.join(BASE_DIR, 'db.sqlite3'),

In last versions of django, we can do the following settings using str():

DATABASES = {
    'default': {
        'ENGINE': 'django.db.backends.sqlite3',
        'NAME': str(BASE_DIR / "db.sqlite3"),
    }
}

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)