Navigation Menu

Skip to content

Commit

Permalink
Moved a backend import to allow changing the backend Haystack uses on…
Browse files Browse the repository at this point in the history
… the fly.


Useful for testing.
  • Loading branch information
toastdriven committed May 20, 2010
1 parent 520294f commit 24583de
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion haystack/query.py
@@ -1,7 +1,6 @@
import re
import warnings
from django.conf import settings
from haystack import backend
from haystack.backends import SQ
from haystack.constants import REPR_OUTPUT_SIZE, ITERATOR_LOAD_PER_QUERY, DEFAULT_OPERATOR
from haystack.exceptions import NotRegistered
Expand All @@ -17,6 +16,7 @@ def __init__(self, site=None, query=None):
if query is not None:
self.query = query
else:
from haystack import backend
self.query = backend.SearchQuery(site=site)

self._result_cache = []
Expand Down

0 comments on commit 24583de

Please sign in to comment.