diff options
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/ref/settings.txt | 14 | ||||
| -rw-r--r-- | docs/releases/1.2.4.txt | 39 | ||||
| -rw-r--r-- | docs/releases/index.txt | 1 | ||||
| -rw-r--r-- | docs/topics/testing.txt | 47 |
4 files changed, 101 insertions, 0 deletions
diff --git a/docs/ref/settings.txt b/docs/ref/settings.txt index 80004a23d7..2b73d4cbf6 100644 --- a/docs/ref/settings.txt +++ b/docs/ref/settings.txt @@ -380,6 +380,20 @@ Only supported for the ``mysql`` backend (see the `MySQL manual`_ for details). .. _MySQL manual: MySQL_ +.. setting:: TEST_DEPENDENCIES + +TEST_DEPENDENCIES +~~~~~~~~~~~~~~~~~ + +.. versionadded:: 1.2.4 + +Default: ``['default']``, for all databases other than ``default``, +which has no dependencies. + +The creation-order dependencies of the database. See the documentation +on :ref:`controlling the creation order of test databases +<topics-testing-creation-dependencies>` for details. + .. setting:: TEST_MIRROR TEST_MIRROR diff --git a/docs/releases/1.2.4.txt b/docs/releases/1.2.4.txt new file mode 100644 index 0000000000..c5d5118161 --- /dev/null +++ b/docs/releases/1.2.4.txt @@ -0,0 +1,39 @@ +========================== +Django 1.2.4 release notes +========================== + +Welcome to Django 1.2.4! + +This is the fourth "bugfix" release in the Django 1.2 series, +improving the stability and performance of the Django 1.2 codebase. + +Django 1.2.4 maintains backwards compatibility with Django +1.2.3, but contain a number of fixes and other +improvements. Django 1.2.4 is a recommended upgrade for any +development or deployment currently using or targeting Django 1.2. + +For full details on the new features, backwards incompatibilities, and +deprecated features in the 1.2 branch, see the :doc:`/releases/1.2`. + +One new feature +=============== + +Ordinarily, a point release would not include new features, but in the +case of Django 1.2.4, we have made an exception to this rule. + +One of the bugs fixed in Django 1.2.4 involves a set of +circumstances whereby a running a test suite on a multiple database +configuration could cause the original source database (i.e., the +actual production database) to be dropped, causing catastrophic loss +of data. In order to provide a fix for this problem, it was necessary +to introduce a new setting -- :setting:`TEST_DEPENDENCIES` -- that +allows you to define any creation order dependencies in your database +configuration. + +Most users -- even users with multiple-database configurations -- need +not be concerned about the data loss bug, or the manual configuration of +:setting:`TEST_DEPENDENCIES`. See the `original problem report`_ +documentation on :ref:`controlling the creation order of test +databases <topics-testing-creation-dependencies>` for details. + +.. _original problem report: http://code.djangoproject.com/ticket/14415
\ No newline at end of file diff --git a/docs/releases/index.txt b/docs/releases/index.txt index 20d9469d6c..7abaf78565 100644 --- a/docs/releases/index.txt +++ b/docs/releases/index.txt @@ -19,6 +19,7 @@ Final releases .. toctree:: :maxdepth: 1 + 1.2.4 1.2.2 1.2 diff --git a/docs/topics/testing.txt b/docs/topics/testing.txt index f597c90fdf..155f758040 100644 --- a/docs/topics/testing.txt +++ b/docs/topics/testing.txt @@ -422,6 +422,53 @@ will be redirected to point at ``default``. As a result, writes to the same database, not because there is data replication between the two databases. +.. _topics-testing-creation-dependencies: + +Controlling creation order for test databases +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +.. versionadded:: 1.2.4 + +By default, Django will always create the ``default`` database first. +However, no guarantees are made on the creation order of any other +databases in your test setup. + +If your database configuration requires a specific creation order, you +can specify the dependencies that exist using the +:setting:`TEST_DEPENDENCIES` setting. Consider the following +(simplified) example database configuration:: + + DATABASES = { + 'default': { + # ... db settings + 'TEST_DEPENDENCIES': ['diamonds'] + }, + 'diamonds': { + # ... db settings + }, + 'clubs': { + # ... db settings + 'TEST_DEPENDENCIES': ['diamonds'] + }, + 'spades': { + # ... db settings + 'TEST_DEPENDENCIES': ['diamonds','hearts'] + }, + 'hearts': { + # ... db settings + 'TEST_DEPENDENCIES': ['diamonds','clubs'] + } + } + +Under this configuration, the ``diamonds`` database will be created first, +as it is the only database alias without dependencies. The ``default``` and +``clubs`` alias will be created next (although the order of creation of this +pair is not guaranteed); then ``hearts``; and finally ``spades``. + +If there are any circular dependencies in the +:setting:`TEST_DEPENDENCIES` definition, an ``ImproperlyConfigured`` +exception will be raised. + Other test conditions --------------------- |
