mirror of
https://github.com/django/django.git
synced 2025-11-07 07:15:35 +00:00
magic-removal: Cleaned up get_in_bulk() and __get_date_list() DB queries to match documentation and improve error checking.
git-svn-id: http://code.djangoproject.com/svn/django/branches/magic-removal@1885 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
@@ -69,6 +69,18 @@ Article 4
|
||||
Traceback (most recent call last):
|
||||
...
|
||||
AssertionError: get_in_bulk() cannot be passed an empty ID list.
|
||||
>>> Article.objects.get_in_bulk('foo')
|
||||
Traceback (most recent call last):
|
||||
...
|
||||
AssertionError: get_in_bulk() must be provided with a list of IDs.
|
||||
>>> Article.objects.get_in_bulk()
|
||||
Traceback (most recent call last):
|
||||
...
|
||||
TypeError: get_in_bulk() takes at least 2 arguments (1 given)
|
||||
>>> Article.objects.get_in_bulk(headline__startswith='Blah')
|
||||
Traceback (most recent call last):
|
||||
...
|
||||
TypeError: get_in_bulk() takes at least 2 non-keyword arguments (1 given)
|
||||
|
||||
# get_values() is just like get_list(), except it returns a list of
|
||||
# dictionaries instead of object instances -- and you can specify which fields
|
||||
|
||||
Reference in New Issue
Block a user