summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
Diffstat (limited to 'docs')
-rw-r--r--docs/authentication.txt8
-rw-r--r--docs/contributing.txt59
-rw-r--r--docs/db-api.txt54
-rw-r--r--docs/django-admin.txt2
-rw-r--r--docs/email.txt126
-rw-r--r--docs/faq.txt5
-rw-r--r--docs/generic_views.txt4
-rw-r--r--docs/install.txt35
-rw-r--r--docs/legacy_databases.txt2
-rw-r--r--docs/model-api.txt27
-rw-r--r--docs/newforms.txt2
-rw-r--r--docs/release_notes_0.96.txt2
-rw-r--r--docs/serialization.txt4
-rw-r--r--docs/settings.txt6
-rw-r--r--docs/templates.txt3
-rw-r--r--docs/templates_python.txt2
-rw-r--r--docs/testing.txt8
-rw-r--r--docs/tutorial01.txt4
18 files changed, 296 insertions, 57 deletions
diff --git a/docs/authentication.txt b/docs/authentication.txt
index 12b61db538..efe4d47513 100644
--- a/docs/authentication.txt
+++ b/docs/authentication.txt
@@ -161,8 +161,8 @@ The ``User`` model has a custom manager that has the following helper functions:
* ``make_random_password(length=10, allowed_chars='abcdefghjkmnpqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ23456789')``
Returns a random password with the given length and given string of
allowed characters. (Note that the default value of ``allowed_chars``
- doesn't contain ``"I"`` or letters that look like it, to avoid user
- confusion.
+ doesn't contain letters that can cause user confusion, including
+ ``1``, ``I`` and ``0``).
Basic usage
-----------
@@ -325,7 +325,7 @@ Manually checking a user's password
If you'd like to manually authenticate a user by comparing a
plain-text password to the hashed password in the database, use the
-convenience function `django.contrib.auth.models.check_password`. It
+convenience function ``django.contrib.auth.models.check_password``. It
takes two arguments: the plain-text password to check, and the full
value of a user's ``password`` field in the database to check against,
and returns ``True`` if they match, ``False`` otherwise.
@@ -461,7 +461,7 @@ block::
Other built-in views
--------------------
-In addition to the `login` view, the authentication system includes a
+In addition to the ``login`` view, the authentication system includes a
few other useful built-in views:
``django.contrib.auth.views.logout``
diff --git a/docs/contributing.txt b/docs/contributing.txt
index 31409f27bd..b3c7efa2f7 100644
--- a/docs/contributing.txt
+++ b/docs/contributing.txt
@@ -382,6 +382,65 @@ Model style
('F', 'Female'),
)
+Documentation style
+===================
+
+We place a high importance on consistency and readability of documentation.
+(After all, Django was created in a journalism environment!)
+
+Guidelines for ReST files
+-------------------------
+
+These guidelines regulate the format of our ReST documentation:
+
+ * In section titles, capitalize only initial words and proper nouns.
+
+ * Wrap the documentation at 80 characters wide, unless a code example
+ is significantly less readable when split over two lines, or for another
+ good reason.
+
+Commonly used terms
+-------------------
+
+Here are some style guidelines on commonly used terms throughout the
+documentation:
+
+ * **Django** -- when referring to the framework, capitalize Django. It is
+ lowercase only in Python code and in the djangoproject.com logo.
+
+ * **e-mail** -- it has a hyphen.
+
+ * **MySQL**
+
+ * **PostgreSQL**
+
+ * **Python** -- when referring to the language, capitalize Python.
+
+ * **realize**, **customize**, **initialize**, etc. -- use the American
+ "ize" suffix, not "ise."
+
+ * **SQLite**
+
+ * **subclass** -- it's a single word without a hyphen, both as a verb
+ ("subclass that model") and as a noun ("create a subclass").
+
+ * **Web**, **World Wide Web**, **the Web** -- note Web is always
+ capitalized when referring to the World Wide Web.
+
+ * **Web site** -- use two words, with Web capitalized.
+
+Django-specific terminology
+---------------------------
+
+ * **model** -- it's not capitalized.
+
+ * **template** -- it's not capitalized.
+
+ * **URLconf** -- use three capitalized letters, with no space before
+ "conf."
+
+ * **view** -- it's not capitalized.
+
Committing code
===============
diff --git a/docs/db-api.txt b/docs/db-api.txt
index e7b8183f6c..a4b920fb33 100644
--- a/docs/db-api.txt
+++ b/docs/db-api.txt
@@ -1173,6 +1173,58 @@ like ``contains`` but is significantly faster due to full-text indexing.
Note this is only available in MySQL and requires direct manipulation of the
database to add the full-text index.
+regex
+~~~~~
+
+**New in Django development version**
+
+Case-sensitive regular expression match.
+
+The regular expression syntax is that of the database backend in use. In the
+case of SQLite, which doesn't natively support regular-expression lookups, the
+syntax is that of Python's ``re`` module.
+
+Example::
+
+ Entry.objects.get(title__regex=r'^(An?|The) +')
+
+SQL equivalents::
+
+ SELECT ... WHERE title REGEXP BINARY '^(An?|The) +'; -- MySQL
+
+ SELECT ... WHERE REGEXP_LIKE(title, '^(an?|the) +', 'c'); -- Oracle
+
+ SELECT ... WHERE title ~ '^(An?|The) +'; -- PostgreSQL
+
+ SELECT ... WHERE title REGEXP '^(An?|The) +'; -- SQLite
+
+Using raw strings (e.g., ``r'foo'`` instead of ``'foo'``) for passing in the
+regular expression syntax is recommended.
+
+Regular expression matching is not supported on the ``ado_mssql`` backend.
+It will raise a ``NotImplementedError`` at runtime.
+
+iregex
+~~~~~~
+
+**New in Django development version**
+
+Case-insensitive regular expression match.
+
+Example::
+
+ Entry.objects.get(title__iregex=r'^(an?|the) +')
+
+SQL equivalents::
+
+ SELECT ... WHERE title REGEXP '^(an?|the) +'; -- MySQL
+
+ SELECT ... WHERE REGEXP_LIKE(title, '^(an?|the) +', 'i'); -- Oracle
+
+ SELECT ... WHERE title ~* '^(an?|the) +'; -- PostgreSQL
+
+ SELECT ... WHERE title REGEXP '(?i)^(an?|the) +'; -- SQLite
+
Default lookups are exact
-------------------------
@@ -1779,7 +1831,7 @@ use the default manager, or if you want to search a list of related objects,
you can provide ``get_object_or_404()`` with a manager object instead.
For example::
- # Get the author of blog instance `e` with a name of 'Fred'
+ # Get the author of blog instance e with a name of 'Fred'
a = get_object_or_404(e.authors, name='Fred')
# Use a custom manager 'recent_entries' in the search for an
diff --git a/docs/django-admin.txt b/docs/django-admin.txt
index d20db7edc9..75c2738543 100644
--- a/docs/django-admin.txt
+++ b/docs/django-admin.txt
@@ -513,7 +513,7 @@ Example usage::
Verbosity determines the amount of notification and debug information that
will be printed to the console. '0' is no output, '1' is normal output,
-and `2` is verbose output.
+and ``2`` is verbose output.
--adminmedia
------------
diff --git a/docs/email.txt b/docs/email.txt
index 66948e5294..50dafaf8df 100644
--- a/docs/email.txt
+++ b/docs/email.txt
@@ -28,9 +28,9 @@ settings, if set, are used to authenticate to the SMTP server, and the
.. note::
The character set of e-mail sent with ``django.core.mail`` will be set to
- the value of your `DEFAULT_CHARSET setting`_.
+ the value of your `DEFAULT_CHARSET`_ setting.
-.. _DEFAULT_CHARSET setting: ../settings/#default-charset
+.. _DEFAULT_CHARSET: ../settings/#default-charset
.. _EMAIL_HOST: ../settings/#email-host
.. _EMAIL_PORT: ../settings/#email-port
.. _EMAIL_HOST_USER: ../settings/#email-host-user
@@ -198,27 +198,58 @@ e-mail, you can subclass these two classes to suit your needs.
.. note::
Not all features of the ``EmailMessage`` class are available through the
``send_mail()`` and related wrapper functions. If you wish to use advanced
- features, such as BCC'ed recipients or multi-part e-mail, you'll need to
- create ``EmailMessage`` instances directly.
+ features, such as BCC'ed recipients, file attachments, or multi-part
+ e-mail, you'll need to create ``EmailMessage`` instances directly.
+
+ This is a design feature. ``send_mail()`` and related functions were
+ originally the only interface Django provided. However, the list of
+ parameters they accepted was slowly growing over time. It made sense to
+ move to a more object-oriented design for e-mail messages and retain the
+ original functions only for backwards compatibility.
In general, ``EmailMessage`` is responsible for creating the e-mail message
itself. ``SMTPConnection`` is responsible for the network connection side of
the operation. This means you can reuse the same connection (an
``SMTPConnection`` instance) for multiple messages.
-The ``EmailMessage`` class is initialized as follows::
+E-mail messages
+---------------
+
+The ``EmailMessage`` class is initialized with the following parameters (in
+the given order, if positional arguments are used). All parameters are
+optional and can be set at any time prior to calling the ``send()`` method.
+
+ * ``subject``: The subject line of the e-mail.
+
+ * ``body``: The body text. This should be a plain text message.
+
+ * ``from_email``: The sender's address. Both ``fred@example.com`` and
+ ``Fred <fred@example.com>`` forms are legal. If omitted, the
+ ``DEFAULT_FROM_EMAIL`` setting is used.
+
+ * ``to``: A list or tuple of recipient addresses.
- email = EmailMessage(subject, body, from_email, to, bcc, connection)
+ * ``bcc``: A list or tuple of addresses used in the "Bcc" header when
+ sending the e-mail.
-All of these parameters are optional. If ``from_email`` is omitted, the value
-from ``settings.DEFAULT_FROM_EMAIL`` is used. Both the ``to`` and ``bcc``
-parameters are lists of addresses, as strings.
+ * ``connection``: An ``SMTPConnection`` instance. Use this parameter if
+ you want to use the same conneciton for multiple messages. If omitted, a
+ new connection is created when ``send()`` is called.
+
+ * ``attachments``: A list of attachments to put on the message. These can
+ be either ``email.MIMEBase.MIMEBase`` instances, or ``(filename,
+ content, mimetype)`` triples.
+
+ * ``headers``: A dictionary of extra headers to put on the message. The
+ keys are the header name, values are the header values. It's up to the
+ caller to ensure header names and values are in the correct format for
+ an e-mail message.
For example::
email = EmailMessage('Hello', 'Body goes here', 'from@example.com',
- ['to1@example.com', 'to2@example.com'],
- ['bcc@example.com'])
+ ['to1@example.com', 'to2@example.com'], ['bcc@example.com'],
+ headers = {'Reply-To': 'another@example.com'})
The class has the following methods:
@@ -227,18 +258,83 @@ The class has the following methods:
if none already exists.
* ``message()`` constructs a ``django.core.mail.SafeMIMEText`` object (a
- sub-class of Python's ``email.MIMEText.MIMEText`` class) holding the
- message to be sent. If you ever need to extend the `EmailMessage` class,
- you'll probably want to override this method to put the content you wish
+ subclass of Python's ``email.MIMEText.MIMEText`` class) or a
+ ``django.core.mail.SafeMIMEMultipart`` object holding the
+ message to be sent. If you ever need to extend the ``EmailMessage`` class,
+ you'll probably want to override this method to put the content you want
into the MIME object.
* ``recipients()`` returns a list of all the recipients of the message,
whether they're recorded in the ``to`` or ``bcc`` attributes. This is
- another method you might need to override when sub-classing, because the
+ another method you might need to override when subclassing, because the
SMTP server needs to be told the full list of recipients when the message
is sent. If you add another way to specify recipients in your class, they
need to be returned from this method as well.
+ * ``attach()`` creates a new file attachment and adds it to the message.
+ There are two ways to call ``attach()``:
+
+ * You can pass it a single argument that is an
+ ``email.MIMBase.MIMEBase`` instance. This will be inserted directly
+ into the resulting message.
+
+ * Alternatively, you can pass ``attach()`` three arguments:
+ ``filename``, ``content`` and ``mimetype``. ``filename`` is the name
+ of the file attachment as it will appear in the e-mail, ``content`` is
+ the data that will be contained inside the attachment and
+ ``mimetype`` is the optional MIME type for the attachment. If you
+ omit ``mimetype``, the MIME content type will be guessed from the
+ filename of the attachment.
+
+ For example::
+
+ message.attach('design.png', img_data, 'image/png')
+
+ * ``attach_file()`` creates a new attachment using a file from your
+ filesystem. Call it with the path of the file to attach and, optionally,
+ the MIME type to use for the attachment. If the MIME type is omitted, it
+ will be guessed from the filename. The simplest use would be::
+
+ message.attach_file('/images/weather_map.png')
+
+Sending alternative content types
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+It can be useful to include multiple versions of the content in an e-mail;
+the classic example is to send both text and HTML versions of a message. With
+Django's e-mail library, you can do this using the ``EmailMultiAlternatives``
+class. This subclass of ``EmailMessage`` has an ``attach_alternative()`` method
+for including extra versions of the message body in the e-mail. All the other
+methods (including the class initialization) are inherited directly from
+``EmailMessage``.
+
+To send a text and HTML combination, you could write::
+
+ from django.core.mail import EmailMultiAlternatives
+
+ subject, from_email, to = 'hello', 'from@example.com', 'to@example.com'
+ text_content = 'This is an important message.'
+ html_content = '<p>This is an <strong>important</strong> message.'
+ msg = EmailMultiAlternatives(subject, text_content, from_email, to)
+ msg.attach_alternative(html_content, "text/html")
+ msg.send()
+
+By default, the MIME type of the ``body`` parameter in an ``EmailMessage`` is
+``"text/plain"``. It is good practice to leave this alone, because it
+guarantees that any recipient will be able to read the e-mail, regardless of
+their mail client. However, if you are confident that your recipients can
+handle an alternative content type, you can use the ``content_subtype``
+attribute on the ``EmailMessage`` class to change the main content type. The
+major type will always be ``"text"``, but you can change it to the subtype. For
+example::
+
+ msg = EmailMessage(subject, html_content, from_email, to)
+ msg.content_subtype = "html" # Main content is now text/html
+ msg.send()
+
+SMTP network connections
+------------------------
+
The ``SMTPConnection`` class is initialized with the host, port, username and
password for the SMTP server. If you don't specify one or more of those
options, they are read from your settings file.
diff --git a/docs/faq.txt b/docs/faq.txt
index bdd8c5360e..67ed8a49a5 100644
--- a/docs/faq.txt
+++ b/docs/faq.txt
@@ -104,7 +104,7 @@ Lawrence, Kansas, USA.
`Wilson Miner`_
Wilson's design-fu makes us all look like rock stars. By day, he's an
- interactive designer for `Apple`. Don't ask him what he's working on, or
+ interactive designer for `Apple`_. Don't ask him what he's working on, or
he'll have to kill you. He lives in San Francisco.
On IRC, Wilson goes by ``wilsonian``.
@@ -301,7 +301,7 @@ means it can run on a variety of server platforms.
If you want to use Django with a database, which is probably the case, you'll
also need a database engine. PostgreSQL_ is recommended, because we're
-PostgreSQL fans, and MySQL_ and `SQLite 3`_ are also supported.
+PostgreSQL fans, and MySQL_, `SQLite 3`_, and Oracle_ are also supported.
.. _Python: http://www.python.org/
.. _Apache 2: http://httpd.apache.org/
@@ -310,6 +310,7 @@ PostgreSQL fans, and MySQL_ and `SQLite 3`_ are also supported.
.. _PostgreSQL: http://www.postgresql.org/
.. _MySQL: http://www.mysql.com/
.. _`SQLite 3`: http://www.sqlite.org/
+.. _Oracle: http://www.oracle.com/
Do I lose anything by using Python 2.3 versus newer Python versions, such as Python 2.5?
----------------------------------------------------------------------------------------
diff --git a/docs/generic_views.txt b/docs/generic_views.txt
index 359a82506a..2b80348903 100644
--- a/docs/generic_views.txt
+++ b/docs/generic_views.txt
@@ -754,10 +754,10 @@ If the results are paginated, the context will contain these extra variables:
* ``previous``: The previous page number, as an integer. This is 1-based.
- * `last_on_page`: The number of the
+ * ``last_on_page``: The number of the
last result on the current page. This is 1-based.
- * `first_on_page`: The number of the
+ * ``first_on_page``: The number of the
first result on the current page. This is 1-based.
* ``pages``: The total number of pages, as an integer.
diff --git a/docs/install.txt b/docs/install.txt
index 4f5a4bbe31..e850e48955 100644
--- a/docs/install.txt
+++ b/docs/install.txt
@@ -17,8 +17,10 @@ probably already have it installed.
Install Apache and mod_python
=============================
-If you just want to experiment with Django, skip this step. Django comes with
-its own Web server for development purposes.
+If you just want to experiment with Django, skip ahead to the next
+section; Django includes a lightweight web server you can use for
+testing, so you won't need to set up Apache until you're ready to
+deploy Django in production.
If you want to use Django on a production site, use Apache with `mod_python`_.
mod_python is similar to mod_perl -- it embeds Python within Apache and loads
@@ -46,7 +48,8 @@ Get your database running
If you plan to use Django's database API functionality, you'll need to
make sure a database server is running. Django works with PostgreSQL_,
-MySQL_ and SQLite_.
+MySQL_, Oracle_ and SQLite_ (the latter doesn't require a separate server to
+be running).
Additionally, you'll need to make sure your Python database bindings are
installed.
@@ -62,6 +65,8 @@ installed.
* If you're using SQLite, you'll need pysqlite_. Use version 2.0.3 or higher.
+* If you're using Oracle, you'll need cx_Oracle_, version 4.3.1 or higher.
+
.. _PostgreSQL: http://www.postgresql.org/
.. _MySQL: http://www.mysql.com/
.. _Django's ticket system: http://code.djangoproject.com/report/1
@@ -71,6 +76,8 @@ installed.
.. _SQLite: http://www.sqlite.org/
.. _pysqlite: http://initd.org/tracker/pysqlite
.. _MySQL backend: ../databases/
+.. _cx_Oracle: http://www.python.net/crew/atuining/cx_Oracle/
+.. _Oracle: http://www.oracle.com/
Remove any old versions of Django
=================================
@@ -83,23 +90,20 @@ If you installed Django using ``setup.py install``, uninstalling
is as simple as deleting the ``django`` directory from your Python
``site-packages``.
-If you installed Django from a Python Egg, remove the Django ``.egg`` file,
+If you installed Django from a Python egg, remove the Django ``.egg`` file,
and remove the reference to the egg in the file named ``easy-install.pth``.
This file should also be located in your ``site-packages`` directory.
.. admonition:: Where are my ``site-packages`` stored?
The location of the ``site-packages`` directory depends on the operating
- system, and the location in which Python was installed. However, the
- following locations are common:
-
- * If you're using Linux: ``/usr/lib/python2.X/site-packages``
+ system, and the location in which Python was installed. To find out your
+ system's ``site-packages`` location, execute the following::
- * If you're using Windows: ``C:\Python2.X\lib\site-packages``
+ python -c "from distutils.sysconfig import get_python_lib; print get_python_lib()"
- * If you're using MacOSX: ``/Library/Python2.X/site-packages`` or
- ``/Library/Frameworks/Python.framework/Versions/2.X/lib/python2.X/site-packages/``
- (in later releases).
+ (Note that this should be run from a shell prompt, not a Python interactive
+ prompt.)
Install the Django code
=======================
@@ -138,12 +142,15 @@ latest bug fixes and improvements, follow these instructions:
1. Make sure you have Subversion_ installed.
2. Check out the Django code into your Python ``site-packages`` directory.
+
On Linux / Mac OSX / Unix, do this::
svn co http://code.djangoproject.com/svn/django/trunk/ django_src
- ln -s `pwd`/django_src/django /usr/lib/python2.3/site-packages/django
+ ln -s `pwd`/django_src/django SITE-PACKAGES-DIR/django
- (In the above line, change ``python2.3`` to match your current Python version.)
+ (In the above line, change ``SITE-PACKAGES-DIR`` to match the location of
+ your system's ``site-packages`` directory, as explained in the
+ "Where are my ``site-packages`` stored?" section above.)
On Windows, do this::
diff --git a/docs/legacy_databases.txt b/docs/legacy_databases.txt
index ca3927e52f..b87a661f90 100644
--- a/docs/legacy_databases.txt
+++ b/docs/legacy_databases.txt
@@ -18,7 +18,7 @@ You'll need to tell Django what your database connection parameters are, and
what the name of the database is. Do that by editing these settings in your
`settings file`_:
- * `DATABASE_NAME`
+ * `DATABASE_NAME`_
* `DATABASE_ENGINE`_
* `DATABASE_USER`_
* `DATABASE_PASSWORD`_
diff --git a/docs/model-api.txt b/docs/model-api.txt
index 09440f2b56..22ff7445b5 100644
--- a/docs/model-api.txt
+++ b/docs/model-api.txt
@@ -492,6 +492,11 @@ has ``null=True``, that means it has two possible values for "no data":
possible values for "no data;" Django convention is to use the empty
string, not ``NULL``.
+.. note::
+ When using the Oracle database backend, the ``null=True`` option will
+ be coerced for string-based fields that can blank, and the value
+ ``NULL`` will be stored to denote the empty string.
+
``blank``
~~~~~~~~~
@@ -586,6 +591,16 @@ scenes.
If ``True``, ``django-admin.py sqlindexes`` will output a ``CREATE INDEX``
statement for this field.
+``db_tablespace``
+~~~~~~~~~~~~~~~~~
+
+**New in Django development version**
+
+The name of the database tablespace to use for this field's index, if
+indeed this field is indexed. The default is the ``db_tablespace`` of
+the model, if any. If the backend doesn't support tablespaces, this
+option is ignored.
+
``default``
~~~~~~~~~~~
@@ -996,6 +1011,14 @@ If your database table name is an SQL reserved word, or contains characters
that aren't allowed in Python variable names -- notably, the hyphen --
that's OK. Django quotes column and table names behind the scenes.
+``db_tablespace``
+-----------------
+
+**New in Django development version**
+
+The name of the database tablespace to use for the model. If the backend
+doesn't support tablespaces, this option is ignored.
+
``get_latest_by``
-----------------
@@ -1876,11 +1899,11 @@ used by the SQLite Python bindings. This is for the sake of consistency and
sanity.)
A final note: If all you want to do is a custom ``WHERE`` clause, you can just
-just the ``where``, ``tables`` and ``params`` arguments to the standard lookup
+use the ``where``, ``tables`` and ``params`` arguments to the standard lookup
API. See `Other lookup options`_.
.. _Python DB-API: http://www.python.org/peps/pep-0249.html
-.. _Other lookup options: ../db-api/#extra-params-select-where-tables
+.. _Other lookup options: ../db-api/#extra-select-none-where-none-params-none-tables-none
.. _transaction handling: ../transactions/
Overriding default model methods
diff --git a/docs/newforms.txt b/docs/newforms.txt
index 1511791a7d..41db04a7dd 100644
--- a/docs/newforms.txt
+++ b/docs/newforms.txt
@@ -110,7 +110,7 @@ shortly.
Creating ``Form`` instances
---------------------------
-A ``Form`` instance is either **bound** or **unbound** to a set of data.
+A ``Form`` instance is either **bound** to a set of data, or **unbound**.
* If it's **bound** to a set of data, it's capable of validating that data
and rendering the form as HTML with the data displayed in the HTML.
diff --git a/docs/release_notes_0.96.txt b/docs/release_notes_0.96.txt
index f62780c6b2..4227de8155 100644
--- a/docs/release_notes_0.96.txt
+++ b/docs/release_notes_0.96.txt
@@ -28,7 +28,7 @@ The following changes may require you to update your code when you switch from
Due to a bug in older versions of the ``MySQLdb`` Python module (which
Django uses to connect to MySQL databases), Django's MySQL backend now
-requires version 1.2.1p2 or higher of `MySQLdb`, and will raise
+requires version 1.2.1p2 or higher of ``MySQLdb``, and will raise
exceptions if you attempt to use an older version.
If you're currently unable to upgrade your copy of ``MySQLdb`` to meet
diff --git a/docs/serialization.txt b/docs/serialization.txt
index 01afa2708c..fa9b4edd51 100644
--- a/docs/serialization.txt
+++ b/docs/serialization.txt
@@ -48,12 +48,12 @@ Subset of fields
~~~~~~~~~~~~~~~~
If you only want a subset of fields to be serialized, you can
-specify a `fields` argument to the serializer::
+specify a ``fields`` argument to the serializer::
from django.core import serializers
data = serializers.serialize('xml', SomeModel.objects.all(), fields=('name','size'))
-In this example, only the `name` and `size` attributes of each model will
+In this example, only the ``name`` and ``size`` attributes of each model will
be serialized.
.. note::
diff --git a/docs/settings.txt b/docs/settings.txt
index 12e6dab4bc..897cdc8099 100644
--- a/docs/settings.txt
+++ b/docs/settings.txt
@@ -244,9 +244,9 @@ DATABASE_ENGINE
Default: ``''`` (Empty string)
-Which database backend to use. Either ``'postgresql_psycopg2'``,
-``'postgresql'``, ``'mysql'``, ``'mysql_old'``, ``'sqlite3'`` or
-``'ado_mssql'``.
+The database backend to use. Either ``'postgresql_psycopg2'``,
+``'postgresql'``, ``'mysql'``, ``'mysql_old'``, ``'sqlite3'``,
+``'oracle'``, or ``'ado_mssql'``.
DATABASE_HOST
-------------
diff --git a/docs/templates.txt b/docs/templates.txt
index cb8e238f43..c32b1af1dd 100644
--- a/docs/templates.txt
+++ b/docs/templates.txt
@@ -1266,7 +1266,8 @@ Converts URLs in plain text into clickable links.
urlizetrunc
~~~~~~~~~~~
-Converts URLs into clickable links, truncating URLs to the given character limit.
+Converts URLs into clickable links, truncating URLs longer than the given
+character limit.
**Argument:** Length to truncate URLs to
diff --git a/docs/templates_python.txt b/docs/templates_python.txt
index f3e2f2c64b..7171f32612 100644
--- a/docs/templates_python.txt
+++ b/docs/templates_python.txt
@@ -342,7 +342,7 @@ If ``TEMPLATE_CONTEXT_PROCESSORS`` contains this processor, every
* ``user`` -- An ``auth.User`` instance representing the currently
logged-in user (or an ``AnonymousUser`` instance, if the client isn't
- logged in). See the `user authentication docs`.
+ logged in). See the `user authentication docs`_.
* ``messages`` -- A list of messages (as strings) for the currently
logged-in user. Behind the scenes, this calls
diff --git a/docs/testing.txt b/docs/testing.txt
index 50c4ec3046..b326e0099d 100644
--- a/docs/testing.txt
+++ b/docs/testing.txt
@@ -253,8 +253,8 @@ can be invoked on the ``Client`` instance.
f.close()
will result in the evaluation of a POST request on ``/customers/wishes/``,
- with a POST dictionary that contains `name`, `attachment` (containing the
- file name), and `attachment_file` (containing the file data). Note that you
+ with a POST dictionary that contains ``name``, ``attachment`` (containing the
+ file name), and ``attachment_file`` (containing the file data). Note that you
need to manually close the file after it has been provided to the POST.
``login(**credentials)``
@@ -660,8 +660,8 @@ arguments:
tested. This is the same format returned by ``django.db.models.get_apps()``
Verbosity determines the amount of notification and debug information that
- will be printed to the console; `0` is no output, `1` is normal output,
- and `2` is verbose output.
+ will be printed to the console; ``0`` is no output, ``1`` is normal output,
+ and ``2`` is verbose output.
This method should return the number of tests that failed.
diff --git a/docs/tutorial01.txt b/docs/tutorial01.txt
index c40b051b19..fdac9c554e 100644
--- a/docs/tutorial01.txt
+++ b/docs/tutorial01.txt
@@ -10,7 +10,7 @@ poll application.
It'll consist of two parts:
* A public site that lets people view polls and vote in them.
- * An admin site that lets you add, change and delete poll.
+ * An admin site that lets you add, change and delete polls.
We'll assume you have `Django installed`_ already. You can tell Django is
installed by running the Python interactive interpreter and typing
@@ -360,7 +360,7 @@ Note the following:
quotes. The author of this tutorial runs PostgreSQL, so the example
output is in PostgreSQL syntax.
- * The `sql` command doesn't actually run the SQL in your database - it just
+ * The ``sql`` command doesn't actually run the SQL in your database - it just
prints it to the screen so that you can see what SQL Django thinks is required.
If you wanted to, you could copy and paste this SQL into your database prompt.
However, as we will see shortly, Django provides an easier way of committing