Permalink
Browse files

fix import of QueryWrapper for django 1.4

  • Loading branch information...
1 parent 64348d3 commit 078817248d86828d8fa9999a341273f510db7746 Zohar Zilberman committed Sep 18, 2011
Showing with 5 additions and 2 deletions.
  1. +5 −2 django_hstore/query.py
@@ -5,8 +5,11 @@
from django.db.models.sql.datastructures import EmptyResultSet
from django.db.models.sql.query import Query
from django.db.models.sql.subqueries import UpdateQuery
-from django.db.models.sql.where import EmptyShortCircuit, WhereNode, QueryWrapper
-
+from django.db.models.sql.where import EmptyShortCircuit, WhereNode
+try:
+ from django.db.models.sql.where import QueryWrapper # django <= 1.3
+except ImportError:
+ from django.db.models.query_utils import QueryWrapper # django >= 1.4
def select_query(method):
def selector(self, *args, **params):

0 comments on commit 0788172

Please sign in to comment.