Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Renumbered all the doctest examples so that they are ordered correctl…

…y on the doc pages.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@4796 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit 189e7dd8023b75640c959bd1dbc0d664f0e283cd 1 parent af1aa1b
Jacob Kaplan-Moss authored March 23, 2007
2  tests/modeltests/empty/models.py
... ...
@@ -1,5 +1,5 @@
1 1
 """
2  
-Empty model tests
  2
+39. Empty model tests
3 3
 
4 4
 These test that things behave sensibly for the rare corner-case of a model with
5 5
 no fields.
2  tests/modeltests/field_defaults/models.py
... ...
@@ -1,5 +1,5 @@
1 1
 """
2  
-31. Callable defaults
  2
+32. Callable defaults
3 3
 
4 4
 You can pass callable objects as the ``default`` parameter to a field. When
5 5
 the object is created without an explicit value passed in, Django will call
2  tests/modeltests/fixtures/models.py
... ...
@@ -1,5 +1,5 @@
1 1
 """
2  
-39. Fixtures.
  2
+37. Fixtures.
3 3
 
4 4
 Fixtures are a way of loading data into the database in bulk. Fixure data 
5 5
 can be stored in any serializable format (including JSON and XML). Fixtures 
2  tests/modeltests/generic_relations/models.py
... ...
@@ -1,5 +1,5 @@
1 1
 """
2  
-33. Generic relations
  2
+34. Generic relations
3 3
 
4 4
 Generic relations let an object have a foreign key to any object through a
5 5
 content-type/object-id field. A generic foreign key can point to any object,
2  tests/modeltests/get_object_or_404/models.py
... ...
@@ -1,5 +1,5 @@
1 1
 """
2  
-34. DB-API Shortcuts
  2
+35. DB-API Shortcuts
3 3
 
4 4
 get_object_or_404 is a shortcut function to be used in view functions for
5 5
 performing a get() lookup and raising a Http404 exception if a DoesNotExist
2  tests/modeltests/get_or_create/models.py
... ...
@@ -1,5 +1,5 @@
1 1
 """
2  
-32. get_or_create()
  2
+33. get_or_create()
3 3
 
4 4
 get_or_create() does what it says: it tries to look up an object with the given
5 5
 parameters. If an object isn't found, it creates one with the given parameters.
2  tests/modeltests/m2m_and_m2o/models.py
... ...
@@ -1,5 +1,5 @@
1 1
 """
2  
-28. Many-to-many and many-to-one relationships to the same table
  2
+29. Many-to-many and many-to-one relationships to the same table
3 3
 
4 4
 Make sure to set ``related_name`` if you use relationships to the same table.
5 5
 """
2  tests/modeltests/m2m_recursive/models.py
... ...
@@ -1,5 +1,5 @@
1 1
 """
2  
-27. Many-to-many relationships between the same two tables
  2
+28. Many-to-many relationships between the same two tables
3 3
 
4 4
 In this example, A Person can have many friends, who are also people. Friendship is a
5 5
 symmetrical relationship - if I am your friend, you are my friend.
2  tests/modeltests/manipulators/models.py
... ...
@@ -1,5 +1,5 @@
1 1
 """
2  
-26. Default manipulators
  2
+27. Default manipulators
3 3
 
4 4
 Each model gets an AddManipulator and ChangeManipulator by default.
5 5
 """
2  tests/modeltests/model_forms/models.py
... ...
@@ -1,5 +1,5 @@
1 1
 """
2  
-34. Generating HTML forms from models
  2
+36. Generating HTML forms from models
3 3
 
4 4
 Django provides shortcuts for creating Form objects from a model class and a
5 5
 model instance.
2  tests/modeltests/pagination/models.py
... ...
@@ -1,5 +1,5 @@
1 1
 """
2  
-29. Object pagination
  2
+30. Object pagination
3 3
 
4 4
 Django provides a framework for paginating a list of objects in a few lines
5 5
 of code. This is often useful for dividing search results or long lists of
2  tests/modeltests/select_related/models.py
... ...
@@ -1,5 +1,5 @@
2  tests/modeltests/serializers/models.py
... ...
@@ -1,5 +1,5 @@
1 1
 """
2  
-XXX. Serialization
  2
+41. Serialization
3 3
 
4 4
 ``django.core.serializers`` provides interfaces to converting Django querysets
5 5
 to and from "flat" data (i.e. strings).
2  tests/modeltests/test_client/models.py
... ...
@@ -1,5 +1,5 @@
1 1
 """
2  
-39. Testing using the Test Client
  2
+38. Testing using the Test Client
3 3
 
4 4
 The test client is a class that can act like a simple
5 5
 browser for testing purposes.
2  tests/modeltests/validation/models.py
... ...
@@ -1,5 +1,5 @@
1 1
 """
2  
-30. Validation
  2
+31. Validation
3 3
 
4 4
 This is an experimental feature!
5 5
 

0 notes on commit 189e7dd

Please sign in to comment.
Something went wrong with that request. Please try again.