Anonymous avatar Anonymous committed d7cf687

Renumbered all the doctest examples so that they are ordered correctly on the doc pages.

Comments (0)

Files changed (15)

tests/modeltests/empty/models.py

 """
-Empty model tests
+39. Empty model tests
 
 These test that things behave sensibly for the rare corner-case of a model with
 no fields.

tests/modeltests/field_defaults/models.py

 """
-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

tests/modeltests/fixtures/models.py

 """
-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 

tests/modeltests/generic_relations/models.py

 """
-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,

tests/modeltests/get_object_or_404/models.py

 """
-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

tests/modeltests/get_or_create/models.py

 """
-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.

tests/modeltests/m2m_and_m2o/models.py

 """
-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.
 """

tests/modeltests/m2m_recursive/models.py

 """
-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.

tests/modeltests/manipulators/models.py

 """
-26. Default manipulators
+27. Default manipulators
 
 Each model gets an AddManipulator and ChangeManipulator by default.
 """

tests/modeltests/model_forms/models.py

 """
-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.

tests/modeltests/pagination/models.py

 """
-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

tests/modeltests/select_related/models.py

 """
-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

tests/modeltests/serializers/models.py

 """
-XXX. Serialization
+41. Serialization
 
 ``django.core.serializers`` provides interfaces to converting Django querysets
 to and from "flat" data (i.e. strings).

tests/modeltests/test_client/models.py

 """
-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.

tests/modeltests/validation/models.py

 """
-30. Validation
+31. Validation
 
 This is an experimental feature!
 
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.