From cec677a782d9a90dfae08be0d1db882231c5abaf Mon Sep 17 00:00:00 2001 From: Alex Gaynor Date: Mon, 23 Nov 2009 16:43:35 +0000 Subject: [PATCH] [soc2009/multidb] Fixed some documentation markup problems. Patch from Russell Keith-Magee. git-svn-id: http://code.djangoproject.com/svn/django/branches/soc2009/multidb@11768 bcc190cf-cafb-0310-a4f2-bffc1f526a37 --- docs/ref/models/options.txt | 2 +- docs/ref/models/querysets.txt | 4 ++-- docs/topics/db/multi-db.txt | 10 +++++----- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/docs/ref/models/options.txt b/docs/ref/models/options.txt index 3f06671110..f7feb54e3a 100644 --- a/docs/ref/models/options.txt +++ b/docs/ref/models/options.txt @@ -229,7 +229,7 @@ The alias for the default database to be used for this model. If this is not provided the default is ``'default'``. If it is porvided it can be overidden at the ``QuerySet`` level with the ``using()`` method. -.. versionadded:: TODO +.. versionadded:: 1.2 ``verbose_name`` ---------------- diff --git a/docs/ref/models/querysets.txt b/docs/ref/models/querysets.txt index b165f5b709..45f1c3161b 100644 --- a/docs/ref/models/querysets.txt +++ b/docs/ref/models/querysets.txt @@ -877,12 +877,12 @@ logically:: ``using(alias)`` ~~~~~~~~~~~~~~~~~~ -.. versionadded:: TODO +.. versionadded:: 1.2 This method is for controlling which database the ``QuerySet`` will be evaluated against if you are using more than one database. The only argument this method takes is the alias of a database, as defined in -:settings:`DATABASES`. +:setting:`DATABASES`. For example:: diff --git a/docs/topics/db/multi-db.txt b/docs/topics/db/multi-db.txt index 58fd6af8a9..5db692aee4 100644 --- a/docs/topics/db/multi-db.txt +++ b/docs/topics/db/multi-db.txt @@ -4,7 +4,7 @@ Multiple Databases ================== -.. versionadded:: TODO +.. versionadded:: 1.2 This topic guide describes Django's support for interacting with multiple databases. Most of the rest of Django's documentation assumes you are @@ -17,14 +17,14 @@ Defining Your Databases The first step to using more than one database with Django is to tell Django about the database servers you'll be using. This is done using the -:settings:`DATABASES` setting. This setting maps database aliases, which are +:setting:`DATABASES` setting. This setting maps database aliases, which are a way to refer to a specific database throughout Django, to a dictionary of settings for that specific connection. The settings in the inner dictionaries -are described fully in the :settings:`DATABASES` documentation. The important +are described fully in the :setting:`DATABASES` documentation. The important thing to note is that your primary database should have the alias ``'default'``, and any additional databases you have can have whatever alias you choose. If at any time you attempt to access a database that isn't defined -in your :settings:`DATABASES` setting then Django will raise a +in your :setting:`DATABASES` setting then Django will raise a ``django.db.utils.ConnectionDoesNotExist`` exception. Selecting a Database for a ``Model`` @@ -56,7 +56,7 @@ wanted to save to the ``'legacy_users'`` database you would do:: To save the user. Select a Database to Delete a Model From -======================================= +======================================== To select which database to delete a model from you also use a ``using`` keyword argument to the ``Model.delete()`` method, analogous to the ``using``