小编Ama*_*ain的帖子

为什么我收到“未实现错误:数据库对象未实现真值测试或 bool()”。在 django 中运行 makemigration cmd 时

我正在尝试使用Django进行连接。我更改了数据库参数,但收到此错误MongoDBDjongo

未实现错误:数据库对象未实现真值测试或 bool()。

当我运行 makemigration 命令时。

请问有人可以解释一下为什么我会收到此错误以及如何解决它吗?

我有包含settings.py文件、错误日志和mongodb compass安装映像。

设置.py

"""
Django settings for Chatify project.

Generated by 'django-admin startproject' using Django 3.2.9.

For more information on this file, see
https://docs.djangoproject.com/en/3.2/topics/settings/

For the full list of settings and their values, see
https://docs.djangoproject.com/en/3.2/ref/settings/
"""

from pathlib import Path

# Build paths inside the project like this: BASE_DIR / 'subdir'.
BASE_DIR = Path(__file__).resolve().parent.parent


# Quick-start development settings - unsuitable for production
# See https://docs.djangoproject.com/en/3.2/howto/deployment/checklist/ …
Run Code Online (Sandbox Code Playgroud)

python django mongodb djongo

23
推荐指数
4
解决办法
3万
查看次数

标签 统计

django ×1

djongo ×1

mongodb ×1

python ×1