1
0
mirror of https://github.com/django/django.git synced 2025-10-24 06:06:09 +00:00

Made a bunch more edits up until [17418]

git-svn-id: http://code.djangoproject.com/svn/django/trunk@17428 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
Adrian Holovaty
2012-02-03 20:45:45 +00:00
parent 00227b6529
commit 6ecadcbdd2
11 changed files with 67 additions and 69 deletions

View File

@@ -622,11 +622,11 @@ Providing initial values
.. versionadded:: 1.4
As with regular formsets, it is possible to :ref:`specify initial data
As with regular formsets, it's possible to :ref:`specify initial data
<formsets-initial-data>` for forms in the formset by specifying an ``initial``
parameter when instantiating the model formset class returned by
``modelformset_factory``. However, with model formsets the initial values only
apply to extra forms, those which are not bound to an existing object instance.
``modelformset_factory``. However, with model formsets, the initial values only
apply to extra forms, those that aren't bound to an existing object instance.
.. _saving-objects-in-the-formset:

View File

@@ -1593,11 +1593,10 @@ your test suite.
.. versionadded:: 1.4
You can also use this as a context manager. The code that is executed
under the with statement is then observed instead of a response::
You can use this as a context manager, like this::
# This is necessary in Python 2.5 to enable the with statement, in 2.6
# and up it is no longer necessary.
# This is necessary in Python 2.5 to enable the with statement.
# In 2.6 and up, it's not necessary.
from __future__ import with_statement
with self.assertTemplateUsed('index.html'):
@@ -1680,14 +1679,14 @@ your test suite.
is based on HTML semantics. The comparison takes following things into
account:
* Whitespace before and after HTML tags is ignored
* All types of whitespace are considered equivalent
* All open tags are closed implicitly, i.e. when a surrounding tag is
closed or the HTML document ends
* Empty tags are equivalent to their self-closing version
* The ordering of attributes of an HTML element is not significant
* Whitespace before and after HTML tags is ignored.
* All types of whitespace are considered equivalent.
* All open tags are closed implicitly, e.g. when a surrounding tag is
closed or the HTML document ends.
* Empty tags are equivalent to their self-closing version.
* The ordering of attributes of an HTML element is not significant.
* Attributes without an argument are equal to attributes that equal in
name and value (see the examples)
name and value (see the examples).
The following examples are valid tests and don't raise any
``AssertionError``::
@@ -1714,7 +1713,6 @@ your test suite.
``html1`` and ``html2`` must be valid HTML. An ``AssertionError`` will be
raised if one of them cannot be parsed.
.. _topics-testing-email:
Email services