mirror of
				https://github.com/django/django.git
				synced 2025-10-31 09:41:08 +00:00 
			
		
		
		
	queryset-refactor: The EmptyResultSet exception was declared in two places.
Removed one of them. git-svn-id: http://code.djangoproject.com/svn/django/branches/queryset-refactor@7245 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
		| @@ -2,7 +2,7 @@ import warnings | ||||
|  | ||||
| from django.db import connection, transaction | ||||
| from django.db.models.fields import DateField, FieldDoesNotExist | ||||
| from django.db.models.query_utils import Q, EmptyResultSet, not_q | ||||
| from django.db.models.query_utils import Q, not_q | ||||
| from django.db.models import signals, sql | ||||
| from django.dispatch import dispatcher | ||||
| from django.utils.datastructures import SortedDict | ||||
| @@ -12,6 +12,9 @@ from django.utils.datastructures import SortedDict | ||||
| CHUNK_SIZE = 100 | ||||
| ITER_CHUNK_SIZE = CHUNK_SIZE | ||||
|  | ||||
| # Pull into this namespace for backwards compatibility | ||||
| EmptyResultSet = sql.EmptyResultSet | ||||
|  | ||||
| class _QuerySet(object): | ||||
|     "Represents a lazy database lookup for a set of objects" | ||||
|     def __init__(self, model=None, query=None): | ||||
|   | ||||
| @@ -9,12 +9,6 @@ from copy import deepcopy | ||||
|  | ||||
| from django.utils import tree | ||||
|  | ||||
| class EmptyResultSet(Exception): | ||||
|     """ | ||||
|     Raised when a QuerySet cannot contain any data. | ||||
|     """ | ||||
|     pass | ||||
|  | ||||
| class QueryWrapper(object): | ||||
|     """ | ||||
|     A type that indicates the contents are an SQL fragment and the associate | ||||
|   | ||||
| @@ -1,6 +1,7 @@ | ||||
| from query import * | ||||
| from subqueries import * | ||||
| from where import AND, OR | ||||
| from datastructures import EmptyResultSet | ||||
|  | ||||
| __all__ = ['Query', 'AND', 'OR'] | ||||
| __all__ = ['Query', 'AND', 'OR', 'EmptyResultSet'] | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user