Django Book 翻译
菜单>:
TOC
返回
原文:
.. table:: Table 5-2. Database Configuration Error Messages +----------------------+------------------------------------------------------------------------+ |Error Message |Solution | +======================+========================================================================+ |You havent set the |Set the ``DATABASE_ENGINE`` setting to something other than an empty | |DATABASE_ENGINE |string. | |setting yet. | | +----------------------+------------------------------------------------------------------------+ |Environment variable |Run the command ``python manage.py shell`` rather than ``python`` . | |DJANGO_SETTINGS_MODULE| | |is undefined. | | +----------------------+------------------------------------------------------------------------+ |Error loading _____ |You havent installed the appropriate database-specific adapter (e.g., | |module: No module |``psycopg`` or ``MySQLdb`` ). | |named _____. | | +----------------------+------------------------------------------------------------------------+ |_____ isnt an |Set your ``DATABASE_ENGINE`` setting to one of the valid engine settings| |available database |described previously. Perhaps you made a typo? | |backend. | | +----------------------+------------------------------------------------------------------------+ |database _____ does |Change the ``DATABASE_NAME`` setting to point to a database that exists,| |not exist |or execute the appropriate ``CREATE DATABASE`` statement in order to | | |create it. | +----------------------+------------------------------------------------------------------------+ |role _____ does not |Change the ``DATABASE_USER`` setting to point to a user that exists, or | |exist |create the user in your database. | +----------------------+------------------------------------------------------------------------+ |could not connect to |Make sure ``DATABASE_HOST`` and ``DATABASE_PORT`` are set correctly, and| |server |make sure the server is running. | +----------------------+------------------------------------------------------------------------+
翻译:
.. table:: 表 5-2. 数据库配置错误信息 +----------------------+------------------------------------------------------------------------+ |错误信息 |解决方案 | +======================+========================================================================+ |You havent set the |设置正确的 ``DATABASE_ENGINE`` 配置 | |DATABASE_ENGINE | | |setting yet. | | +----------------------+------------------------------------------------------------------------+ |Environment variable |运行命令行 ``python manage.py shell`` 而不是 ``python`` . | |DJANGO_SETTINGS_MODULE| | |is undefined. | | +----------------------+------------------------------------------------------------------------+ |Error loading _____ |你没有安装相关的数据库适配器 (例如, | |module: No module |``psycopg`` 或 ``MySQLdb`` ). | |named _____. | | +----------------------+------------------------------------------------------------------------+ |_____ isnt an |设置正确的 ``DATABASE_ENGINE`` 配置 | |available database |也许是拼写错误? | |backend. | | +----------------------+------------------------------------------------------------------------+ |database _____ does |设置 ``DATABASE_NAME`` 配置到一个已有的数据库, | |not exist |或者使用 ``CREATE DATABASE`` 语句创建数据库。 | | | | +----------------------+------------------------------------------------------------------------+ |role _____ does not |修改 ``DATABASE_USER`` 配置到一个有效用户 | |exist | | +----------------------+------------------------------------------------------------------------+ |could not connect to |确认 ``DATABASE_HOST`` 和 ``DATABASE_PORT`` 设置是正确的,并 | |server |确认服务器是在运行的。 | +----------------------+------------------------------------------------------------------------+
备注:
译者: