django.db.backends.dummy和django.db.backends.mysql有什么区别? [英] What is the difference between django.db.backends.dummy and django.db.backends.mysql?
本文介绍了django.db.backends.dummy和django.db.backends.mysql有什么区别?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
django.db.backends.dummy和django.db.backends.mysql有什么区别?
我发现有人使用虚拟和mysql,但我不知道他们的差异搜索后。
What is the difference between django.db.backends.dummy and django.db.backends.mysql? I find that someone use dummy and mysql, but I do not know their difference After searching.
推荐答案
django.db.backends.mysql
用于后端数据库 MySQL
。
这是由数据库设置驱动的引擎
ENGINE = `django.db.backends.postgresql_psycopg2`
哪里, django.db.backends.dummy
不是每次说出一个设置,而是由
Where as, django.db.backends.dummy
is not a setting per say, but is triggered with
ENGINE = '' # The default setting for ENGINE
此外,
挖掘源代码 django.db.backends.dummy
,
Django使用这个数据库ENGINE设置为空(无或空字符串)。
Django uses this if the database ENGINE setting is empty (None or empty string).
另外, dummy
引发错误:
ImproperlyConfigured("settings.DATABASES is improperly configured. "
"Please supply the ENGINE value. Check "
"settings documentation for more details.")
这篇关于django.db.backends.dummy和django.db.backends.mysql有什么区别?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文