1
0
mirror of https://github.com/django/django.git synced 2025-07-06 10:49:17 +00:00

[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
This commit is contained in:
Alex Gaynor 2009-11-23 16:43:35 +00:00
parent 30d5a3c8f7
commit cec677a782
3 changed files with 8 additions and 8 deletions

View File

@ -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 provided the default is ``'default'``. If it is porvided it can be overidden
at the ``QuerySet`` level with the ``using()`` method. at the ``QuerySet`` level with the ``using()`` method.
.. versionadded:: TODO .. versionadded:: 1.2
``verbose_name`` ``verbose_name``
---------------- ----------------

View File

@ -877,12 +877,12 @@ logically::
``using(alias)`` ``using(alias)``
~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~
.. versionadded:: TODO .. versionadded:: 1.2
This method is for controlling which database the ``QuerySet`` will be This method is for controlling which database the ``QuerySet`` will be
evaluated against if you are using more than one database. The only argument 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 this method takes is the alias of a database, as defined in
:settings:`DATABASES`. :setting:`DATABASES`.
For example:: For example::

View File

@ -4,7 +4,7 @@
Multiple Databases Multiple Databases
================== ==================
.. versionadded:: TODO .. versionadded:: 1.2
This topic guide describes Django's support for interacting with multiple This topic guide describes Django's support for interacting with multiple
databases. Most of the rest of Django's documentation assumes you are 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 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 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 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 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 thing to note is that your primary database should have the alias
``'default'``, and any additional databases you have can have whatever 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 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. ``django.db.utils.ConnectionDoesNotExist`` exception.
Selecting a Database for a ``Model`` 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. To save the user.
Select a Database to Delete a Model From Select a Database to Delete a Model From
======================================= ========================================
To select which database to delete a model from you also use a ``using`` 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`` keyword argument to the ``Model.delete()`` method, analogous to the ``using``