Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Updated patch applied in r12504. Refs #12806.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@12508 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit 7ca3e8fecf3788d219720138be3ec80fec527ab6 1 parent 1d5165e
Justin Bronn authored February 23, 2010
2  docs/topics/db/sql.txt
@@ -100,7 +100,7 @@ write::
100 100
     >>> first_person = Person.objects.raw('SELECT * from myapp_person')[0]
101 101
 
102 102
 However, the indexing and slicing are not performed at the database level. If
103  
-you have a big amount of ``Person`` objects in your database, it would be more
  103
+you have a big amount of ``Person`` objects in your database, it is more
104 104
 efficient to limit the query at the SQL level::
105 105
 
106 106
     >>> first_person = Person.objects.raw('SELECT * from myapp_person LIMIT 1')[0]
6  tests/modeltests/raw_query/tests.py
@@ -196,8 +196,4 @@ def testGetItem(self):
196 196
         first_two = Author.objects.raw(query)[0:2]
197 197
         self.assertEquals(len(first_two), 2)
198 198
 
199  
-        try:
200  
-            Author.objects.raw(query)['test']
201  
-            self.fail('Index lookups should only accept int, long or slice')
202  
-        except TypeError:
203  
-            pass
  199
+        self.assertRaises(TypeError, lambda: Author.objects.raw(query)['test'])

0 notes on commit 7ca3e8f

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