summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorMalcolm Tredinnick <malcolm.tredinnick@gmail.com>2007-05-29 12:42:08 +0000
committerMalcolm Tredinnick <malcolm.tredinnick@gmail.com>2007-05-29 12:42:08 +0000
commit0c4385bb02a839147bebe8d3ac25a35a17528a04 (patch)
tree98100e7d0ef1c6f2c18546fd7301abf7dc29319d /docs
parentd9f6470f2dd452280b5dd1108510f3f5dba0cb9c (diff)
Added new TEST_DATABASE_CHARSET and TEST_DATABASE_COLLATION settings to ensure
that databases are created with the expected encoding during testing. git-svn-id: http://code.djangoproject.com/svn/django/trunk@5380 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'docs')
-rw-r--r--docs/settings.txt45
-rw-r--r--docs/testing.txt10
2 files changed, 48 insertions, 7 deletions
diff --git a/docs/settings.txt b/docs/settings.txt
index 7b281cbb23..a96133a156 100644
--- a/docs/settings.txt
+++ b/docs/settings.txt
@@ -826,26 +826,57 @@ misspelled) variables. See `How invalid variables are handled`_.
.. _How invalid variables are handled: ../templates_python/#how-invalid-variables-are-handled
-TEST_RUNNER
------------
+TEST_DATABASE_CHARSET
+---------------------
-Default: ``'django.test.simple.run_tests'``
+**New in Django development version**
-The name of the method to use for starting the test suite. See
-`Testing Django Applications`_.
+Default: ``None``
-.. _Testing Django Applications: ../testing/
+The character set encoding used to create the test database. The value of this
+string is passed directly through to the database, so its format is
+backend-specific.
+
+Supported for the PostgreSQL_ (``postgresql``, ``postgresql_psycopg2``) and MySQL_ (``mysql``, ``mysql_old``) backends.
+
+.. _PostgreSQL: http://www.postgresql.org/docs/8.2/static/multibyte.html
+.. _MySQL: http://www.mysql.org/doc/refman/5.0/en/charset-database.html
+
+TEST_DATABASE_COLLATION
+------------------------
+
+**New in Django development version**
+
+Default: ``None``
+
+The collation order to use when creating the test database. This value is
+passed directly to the backend, so it's format is backend-specific.
+
+Only supported for ``mysql`` and ``mysql_old`` backends (see `section 10.3.2`_
+of the MySQL manual for details).
+
+.. _section 10.3.2: http://www.mysql.org/doc/refman/5.0/en/charset-database.html
TEST_DATABASE_NAME
------------------
Default: ``None``
-The name of database to use when running the test suite. If a value of
+The name of database to use when running the test suite. If a value of
``None`` is specified, the test database will use the name ``'test_' + settings.DATABASE_NAME``. See `Testing Django Applications`_.
.. _Testing Django Applications: ../testing/
+TEST_RUNNER
+-----------
+
+Default: ``'django.test.simple.run_tests'``
+
+The name of the method to use for starting the test suite. See
+`Testing Django Applications`_.
+
+.. _Testing Django Applications: ../testing/
+
TIME_FORMAT
-----------
diff --git a/docs/testing.txt b/docs/testing.txt
index 4e5d1ec079..d36d5204e2 100644
--- a/docs/testing.txt
+++ b/docs/testing.txt
@@ -571,6 +571,16 @@ database settings will the same as they would be for the project normally.
If you wish to use a name other than the default for the test database,
you can use the ``TEST_DATABASE_NAME`` setting to provide a name.
+
+**New in Django development version:** If you wish to have fine-grained
+control over the character set encoding used in your database, you can control
+this with the ``TEST_DATABASE_CHARSET`` setting. For MySQL users, you can also
+control the particular collation used by the test database with the
+``TEST_DATABASE_COLLATION`` setting. Refer to the settings_ documentation for
+details of these advanced settings.
+
+.. _settings: ../settings.txt
+
The test database is created by the user in the ``DATABASE_USER`` setting.
This user needs to have sufficient privileges to create a new database on the
system.