Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Fixed ReST bugs in [689]

git-svn-id: http://code.djangoproject.com/svn/django/trunk@690 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit f053130f678668b95e9b71f38fb179fe60c09b84 1 parent 9e03747
Adrian Holovaty authored September 25, 2005

Showing 1 changed file with 9 additions and 9 deletions. Show diff stats Hide diff stats

  1. 18  docs/db-api.txt
18  docs/db-api.txt
@@ -34,7 +34,7 @@ Basic lookup functions
34 34
 Each model exposes these module-level functions for lookups:
35 35
 
36 36
 get_object(\**kwargs)
37  
---------------------
  37
+---------------------
38 38
 
39 39
 Returns the object matching the given lookup parameters, which should be in
40 40
 the format described in "Field lookups" below. Raises a module-level
@@ -42,14 +42,14 @@ the format described in "Field lookups" below. Raises a module-level
42 42
 Raises ``AssertionError`` if more than one object was found.
43 43
 
44 44
 get_list(\**kwargs)
45  
-------------------
  45
+-------------------
46 46
 
47 47
 Returns a list of objects matching the given lookup parameters, which should be
48 48
 in the format described in "Field lookups" below. If no objects match the given
49 49
 parameters, it returns an empty list. ``get_list()`` will always return a list.
50 50
 
51 51
 get_iterator(\**kwargs)
52  
-----------------------
  52
+-----------------------
53 53
 
54 54
 Just like ``get_list()``, except it returns an iterator instead of a list. This
55 55
 is more efficient for large result sets. This example shows the difference::
@@ -63,7 +63,7 @@ is more efficient for large result sets. This example shows the difference::
63 63
         print repr(obj)
64 64
 
65 65
 get_count(\**kwargs)
66  
--------------------
  66
+--------------------
67 67
 
68 68
 Returns an integer representing the number of objects in the database matching
69 69
 the given lookup parameters, which should be in the format described in
@@ -73,7 +73,7 @@ Depending on which database you're using (e.g. PostgreSQL vs. MySQL), this may
73 73
 return a long integer instead of a normal Python integer.
74 74
 
75 75
 get_values(\**kwargs)
76  
---------------------
  76
+---------------------
77 77
 
78 78
 Just like ``get_list()``, except it returns a list of dictionaries instead of
79 79
 model-instance objects.
@@ -105,13 +105,13 @@ values and you won't need the functionality of a model instance object. It's
105 105
 more efficient to select only the fields you need to use.
106 106
 
107 107
 get_values_iterator(\**kwargs)
108  
------------------------------
  108
+------------------------------
109 109
 
110 110
 Just like ``get_values()``, except it returns an iterator instead of a list.
111 111
 See the section on ``get_iterator()`` above.
112 112
 
113 113
 get_in_bulk(id_list, \**kwargs)
114  
-------------------------------
  114
+-------------------------------
115 115
 
116 116
 Takes a list of IDs and returns a dictionary mapping each ID to an instance of
117 117
 the object with the given ID. Also takes optional keyword lookup arguments,
@@ -500,7 +500,7 @@ following model::
500 500
     'Male'
501 501
 
502 502
 get_next_by_FOO(\**kwargs) and get_previous_by_FOO(\**kwargs)
503  
------------------------------------------------------------
  503
+-------------------------------------------------------------
504 504
 
505 505
 For every ``DateField`` and ``DateTimeField`` that does not have ``null=True``,
506 506
 the object will have ``get_next_by_FOO()`` and ``get_previous_by_FOO()``
@@ -559,7 +559,7 @@ In addition to every function described in "Basic lookup functions" above, a
559 559
 model module might get any or all of the following methods:
560 560
 
561 561
 get_FOO_list(kind, \**kwargs)
562  
-----------------------------
  562
+-----------------------------
563 563
 
564 564
 For every ``DateField`` and ``DateTimeField``, the model module will have a
565 565
 ``get_FOO_list()`` function, where ``FOO`` is the name of the field. This

0 notes on commit f053130

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