diff --git a/tests/modeltests/empty/models.py b/tests/modeltests/empty/models.py index 0e5d572504..2493b53837 100644 --- a/tests/modeltests/empty/models.py +++ b/tests/modeltests/empty/models.py @@ -1,5 +1,5 @@ """ -Empty model tests +39. Empty model tests These test that things behave sensibly for the rare corner-case of a model with no fields. diff --git a/tests/modeltests/field_defaults/models.py b/tests/modeltests/field_defaults/models.py index da4cd38974..8e803d00d8 100644 --- a/tests/modeltests/field_defaults/models.py +++ b/tests/modeltests/field_defaults/models.py @@ -1,5 +1,5 @@ """ -31. Callable defaults +32. Callable defaults You can pass callable objects as the ``default`` parameter to a field. When the object is created without an explicit value passed in, Django will call diff --git a/tests/modeltests/fixtures/models.py b/tests/modeltests/fixtures/models.py index afef6a7389..c75e6723fd 100644 --- a/tests/modeltests/fixtures/models.py +++ b/tests/modeltests/fixtures/models.py @@ -1,5 +1,5 @@ """ -39. Fixtures. +37. Fixtures. Fixtures are a way of loading data into the database in bulk. Fixure data can be stored in any serializable format (including JSON and XML). Fixtures diff --git a/tests/modeltests/generic_relations/models.py b/tests/modeltests/generic_relations/models.py index 2bfb55e618..2b2f64165f 100644 --- a/tests/modeltests/generic_relations/models.py +++ b/tests/modeltests/generic_relations/models.py @@ -1,5 +1,5 @@ """ -33. Generic relations +34. Generic relations Generic relations let an object have a foreign key to any object through a content-type/object-id field. A generic foreign key can point to any object, diff --git a/tests/modeltests/get_object_or_404/models.py b/tests/modeltests/get_object_or_404/models.py index 0aefd40fdf..2ad459669f 100644 --- a/tests/modeltests/get_object_or_404/models.py +++ b/tests/modeltests/get_object_or_404/models.py @@ -1,5 +1,5 @@ """ -34. DB-API Shortcuts +35. DB-API Shortcuts get_object_or_404 is a shortcut function to be used in view functions for performing a get() lookup and raising a Http404 exception if a DoesNotExist diff --git a/tests/modeltests/get_or_create/models.py b/tests/modeltests/get_or_create/models.py index b4f39ceded..f974a82dee 100644 --- a/tests/modeltests/get_or_create/models.py +++ b/tests/modeltests/get_or_create/models.py @@ -1,5 +1,5 @@ """ -32. get_or_create() +33. get_or_create() get_or_create() does what it says: it tries to look up an object with the given parameters. If an object isn't found, it creates one with the given parameters. diff --git a/tests/modeltests/m2m_and_m2o/models.py b/tests/modeltests/m2m_and_m2o/models.py index 7fc66ed5a0..09affb002f 100644 --- a/tests/modeltests/m2m_and_m2o/models.py +++ b/tests/modeltests/m2m_and_m2o/models.py @@ -1,5 +1,5 @@ """ -28. Many-to-many and many-to-one relationships to the same table +29. Many-to-many and many-to-one relationships to the same table Make sure to set ``related_name`` if you use relationships to the same table. """ diff --git a/tests/modeltests/m2m_recursive/models.py b/tests/modeltests/m2m_recursive/models.py index 9f31cf92c0..15c713a759 100644 --- a/tests/modeltests/m2m_recursive/models.py +++ b/tests/modeltests/m2m_recursive/models.py @@ -1,5 +1,5 @@ """ -27. Many-to-many relationships between the same two tables +28. Many-to-many relationships between the same two tables In this example, A Person can have many friends, who are also people. Friendship is a symmetrical relationship - if I am your friend, you are my friend. diff --git a/tests/modeltests/manipulators/models.py b/tests/modeltests/manipulators/models.py index e5b8be55b5..1a44cfe7f4 100644 --- a/tests/modeltests/manipulators/models.py +++ b/tests/modeltests/manipulators/models.py @@ -1,5 +1,5 @@ """ -26. Default manipulators +27. Default manipulators Each model gets an AddManipulator and ChangeManipulator by default. """ diff --git a/tests/modeltests/model_forms/models.py b/tests/modeltests/model_forms/models.py index e64174a23f..d91f1d2d45 100644 --- a/tests/modeltests/model_forms/models.py +++ b/tests/modeltests/model_forms/models.py @@ -1,5 +1,5 @@ """ -34. Generating HTML forms from models +36. Generating HTML forms from models Django provides shortcuts for creating Form objects from a model class and a model instance. diff --git a/tests/modeltests/pagination/models.py b/tests/modeltests/pagination/models.py index 3319b5cafa..94deb885f5 100644 --- a/tests/modeltests/pagination/models.py +++ b/tests/modeltests/pagination/models.py @@ -1,5 +1,5 @@ """ -29. Object pagination +30. Object pagination Django provides a framework for paginating a list of objects in a few lines of code. This is often useful for dividing search results or long lists of diff --git a/tests/modeltests/select_related/models.py b/tests/modeltests/select_related/models.py index 8a19267870..c16cead059 100644 --- a/tests/modeltests/select_related/models.py +++ b/tests/modeltests/select_related/models.py @@ -1,5 +1,5 @@ """ -XXX. Tests for ``select_related()`` +40. Tests for ``select_related()`` ``select_related()`` follows all relationships and pre-caches any foreign key values so that complex trees can be fetched in a single query. However, this diff --git a/tests/modeltests/serializers/models.py b/tests/modeltests/serializers/models.py index e86546c6fe..339303fc0a 100644 --- a/tests/modeltests/serializers/models.py +++ b/tests/modeltests/serializers/models.py @@ -1,5 +1,5 @@ """ -XXX. Serialization +41. Serialization ``django.core.serializers`` provides interfaces to converting Django querysets to and from "flat" data (i.e. strings). diff --git a/tests/modeltests/test_client/models.py b/tests/modeltests/test_client/models.py index 75f3c49908..44ddffb55f 100644 --- a/tests/modeltests/test_client/models.py +++ b/tests/modeltests/test_client/models.py @@ -1,5 +1,5 @@ """ -39. Testing using the Test Client +38. Testing using the Test Client The test client is a class that can act like a simple browser for testing purposes. diff --git a/tests/modeltests/validation/models.py b/tests/modeltests/validation/models.py index 1066faca4f..b31f981aac 100644 --- a/tests/modeltests/validation/models.py +++ b/tests/modeltests/validation/models.py @@ -1,5 +1,5 @@ """ -30. Validation +31. Validation This is an experimental feature!