diff options
| author | Joseph Kocherhans <joseph@jkocherhans.com> | 2007-03-01 00:07:42 +0000 |
|---|---|---|
| committer | Joseph Kocherhans <joseph@jkocherhans.com> | 2007-03-01 00:07:42 +0000 |
| commit | b0bbdc744d17565ae957ed9cad685c2dc47a3d84 (patch) | |
| tree | 58bebcadaf689113b128aa6e5a0f9f83fd426af7 /docs | |
| parent | 811163d24e66d9c1ab9dbb6f69aa368d35a13df8 (diff) | |
Merged to [4656]
git-svn-id: http://code.djangoproject.com/svn/django/branches/newforms-admin@4657 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/authentication.txt | 2 | ||||
| -rw-r--r-- | docs/db-api.txt | 15 | ||||
| -rw-r--r-- | docs/django-admin.txt | 2 | ||||
| -rw-r--r-- | docs/install.txt | 2 | ||||
| -rw-r--r-- | docs/settings.txt | 6 | ||||
| -rw-r--r-- | docs/templates.txt | 1 |
6 files changed, 22 insertions, 6 deletions
diff --git a/docs/authentication.txt b/docs/authentication.txt index 5186c5672c..aff336f67a 100644 --- a/docs/authentication.txt +++ b/docs/authentication.txt @@ -398,7 +398,7 @@ To do this, add the following line to your URLconf:: (r'^accounts/login/$', 'django.contrib.auth.views.login'), -Here's what ``django.contrib.auth.views.login`` does:: +Here's what ``django.contrib.auth.views.login`` does: * If called via ``GET``, it displays a login form that POSTs to the same URL. More on this in a bit. diff --git a/docs/db-api.txt b/docs/db-api.txt index 3dc0efbabd..20a319740e 100644 --- a/docs/db-api.txt +++ b/docs/db-api.txt @@ -596,6 +596,21 @@ related ``Person`` *and* the related ``City``:: Note that ``select_related()`` does not follow foreign keys that have ``null=True``. +Usually, using ``select_related()`` can vastly improve performance because your +app can avoid many database calls. However, in situations with deeply nested +sets of relationships ``select_related()`` can sometimes end up following "too +many" relations, and can generate queries so large that they end up being slow. + +In these situations, you can use the ``depth`` argument to ``select_related()`` +to control how many "levels" of relations ``select_related()`` will actually +follow:: + + b = Book.objects.select_related(depth=1).get(id=4) + p = b.author # Doesn't hit the database. + c = p.hometown # Requires a database call. + +The ``depth`` argument is new in the Django development version. + ``extra(select=None, where=None, params=None, tables=None)`` ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/docs/django-admin.txt b/docs/django-admin.txt index 96316702c8..368062468d 100644 --- a/docs/django-admin.txt +++ b/docs/django-admin.txt @@ -151,7 +151,7 @@ runfcgi [options] ----------------- Starts a set of FastCGI processes suitable for use with any web server which supports the FastCGI protocol. See the `FastCGI deployment -documentation`- for details. Requires the Python FastCGI module from +documentation`_ for details. Requires the Python FastCGI module from `flup`_. .. _FastCGI deployment documentation: ../fastcgi/ diff --git a/docs/install.txt b/docs/install.txt index f73a734aba..3eede02af0 100644 --- a/docs/install.txt +++ b/docs/install.txt @@ -64,7 +64,7 @@ installed. .. _PostgreSQL: http://www.postgresql.org/ .. _MySQL: http://www.mysql.com/ .. _Django's ticket system: http://code.djangoproject.com/report/1 -.. _psycopg: http://initd.org/projects/psycopg1 +.. _psycopg: http://initd.org/tracker/psycopg .. _compiled Windows version: http://stickpeople.com/projects/python/win-psycopg/ .. _MySQLdb: http://sourceforge.net/projects/mysql-python .. _SQLite: http://www.sqlite.org/ diff --git a/docs/settings.txt b/docs/settings.txt index 3f928a2234..873b70a5e2 100644 --- a/docs/settings.txt +++ b/docs/settings.txt @@ -239,10 +239,10 @@ The cache key prefix that the cache middleware should use. See the DATABASE_ENGINE --------------- -Default: ``'postgresql'`` +Default: ``''`` (Empty string) -Which database backend to use. Either ``'postgresql'``, ``'mysql'``, -``'sqlite3'`` or ``'ado_mssql'``. +Which database backend to use. Either ``'postgresql_psycopg2'``, +``'postgresql'``, ``'mysql'``, ``'sqlite3'`` or ``'ado_mssql'``. DATABASE_HOST ------------- diff --git a/docs/templates.txt b/docs/templates.txt index 5a007c13ae..d53270ac16 100644 --- a/docs/templates.txt +++ b/docs/templates.txt @@ -645,6 +645,7 @@ Available format strings: output, because this includes periods to match Associated Press style.) A ``'AM'`` or ``'PM'``. ``'AM'`` + b Month, textual, 3 letters, lowercase. ``'jan'`` B Not implemented. d Day of the month, 2 digits with ``'01'`` to ``'31'`` leading zeros. |
