mirror of
https://github.com/django/django.git
synced 2025-10-24 14:16:09 +00:00
[soc2009/multidb] Renaming of database attributes - you now use NAME, ENGINE, etc rather than DATABASE_NAME, DATABASE_ENGINE inside DATABASES. Also deprecates the use of short names (.e.g., `sqlite3` for backends in ENGINE). Patch from Russell Keith-Magee.
Conflicts: docs/releases/1.2.txt git-svn-id: http://code.djangoproject.com/svn/django/branches/soc2009/multidb@11775 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
@@ -763,18 +763,18 @@ info. Your :setting:`DATABASES` setting needs to define two databases:
|
||||
want. It doesn't need to use the same backend as the ``default``
|
||||
database (although it can use the same backend if you want to).
|
||||
|
||||
If you're using the ``sqlite3`` database backend, you need to define
|
||||
:setting:`DATABASE_ENGINE` for both databases, plus a
|
||||
:setting:`TEST_DATABASE_NAME` for the ``other`` database. The
|
||||
If you're using the SQLite database backend, you need to define
|
||||
:setting:`ENGINE` for both databases, plus a
|
||||
:setting:`TEST_NAME` for the ``other`` database. The
|
||||
following is a minimal settings file that can be used to test SQLite::
|
||||
|
||||
DATABASES = {
|
||||
'default': {
|
||||
'DATABASE_ENGINE': 'sqlite3'
|
||||
'ENGINE': 'django.db.backends.sqlite3'
|
||||
},
|
||||
'other': {
|
||||
'DATABASE_ENGINE': 'sqlite3',
|
||||
'TEST_DATABASE_NAME: 'other_db'
|
||||
'ENGINE': 'django.db.backends.sqlite3',
|
||||
'TEST_NAME: 'other_db'
|
||||
}
|
||||
}
|
||||
|
||||
@@ -782,22 +782,22 @@ following is a minimal settings file that can be used to test SQLite::
|
||||
If you're using another backend, you will need to provide other details for
|
||||
each database:
|
||||
|
||||
* The :setting:`DATABASE_USER` option for each of your databases needs to
|
||||
* The :setting:`USER` option for each of your databases needs to
|
||||
specify an existing user account for the database.
|
||||
|
||||
* The :setting:`DATABASE_PASSWORD` option needs to provide the password for
|
||||
the :setting:`DATABASE_USER` that has been specified.
|
||||
* The :setting:`PASSWORD` option needs to provide the password for
|
||||
the :setting:`USER` that has been specified.
|
||||
|
||||
* The :setting:`DATABASE_NAME` option must be the name of an existing database to
|
||||
* The :setting:`NAME` option must be the name of an existing database to
|
||||
which the given user has permission to connect. The unit tests will not
|
||||
touch this database; the test runner creates a new database whose name is
|
||||
:setting:`DATABASE_NAME` prefixed with ``test_``, and this test database is
|
||||
:setting:`NAME` prefixed with ``test_``, and this test database is
|
||||
deleted when the tests are finished. This means your user account needs
|
||||
permission to execute ``CREATE DATABASE``.
|
||||
|
||||
You will also need to ensure that your database uses UTF-8 as the default
|
||||
character set. If your database server doesn't use UTF-8 as a default charset,
|
||||
you will need to include a value for ``TEST_DATABASE_CHARSET`` in the settings
|
||||
you will need to include a value for ``TEST_CHARSET`` in the settings
|
||||
dictionary for the applicable database.
|
||||
|
||||
If you want to run the full suite of tests, you'll need to install a number of
|
||||
|
||||
Reference in New Issue
Block a user