[Django]-TypeError: unsupported operand type(s) for /: 'str' and 'str' django setting.py

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'),
    }
}

Leave a comment