diff --git a/django_hstore/managers.py b/django_hstore/managers.py index 36ccd42..2b5e908 100755 --- a/django_hstore/managers.py +++ b/django_hstore/managers.py @@ -7,9 +7,9 @@ try: from django.contrib.gis.db import models as geo_models from django_hstore.query import HStoreGeoQuerySet - gis_properly_configured = True + GEODJANGO_INSTALLED = True except: - gis_properly_configured = False + GEODJANGO_INSTALLED = False class HStoreManager(models.Manager): @@ -31,7 +31,7 @@ def hslice(self, attr, keys, **params): return self.filter(**params).hslice(attr, keys) -if gis_properly_configured: +if GEODJANGO_INSTALLED: class HStoreGeoManager(geo_models.GeoManager, HStoreManager): """ Object manager combining Geodjango and hstore. diff --git a/django_hstore/query.py b/django_hstore/query.py index b4de125..76dfebd 100755 --- a/django_hstore/query.py +++ b/django_hstore/query.py @@ -15,9 +15,9 @@ from django.contrib.gis.db.models.sql.query import GeoQuery from django.contrib.gis.db.models.sql.where import \ GeoWhereNode, GeoConstraint - gis_properly_configured = True + GEODJANGO_INSTALLED = True except: - gis_properly_configured = False + GEODJANGO_INSTALLED = False class literal_clause(object): @@ -133,7 +133,7 @@ def make_atom(self, child, qn, connection): make_hstore_atom = make_atom -if gis_properly_configured: +if GEODJANGO_INSTALLED: class HStoreGeoWhereNode(HStoreWhereNode, GeoWhereNode): def make_atom(self, child, qn, connection): @@ -153,7 +153,7 @@ def __init__(self, model): super(HStoreQuery, self).__init__(model, HStoreWhereNode) -if gis_properly_configured: +if GEODJANGO_INSTALLED: class HStoreGeoQuery(GeoQuery, Query): def __init__(self, *args, **kwargs): @@ -220,7 +220,7 @@ def hupdate(self, query, attr, updates): return query -if gis_properly_configured: +if GEODJANGO_INSTALLED: class HStoreGeoQuerySet(HStoreQuerySet, GeoQuerySet): def __init__(self, model=None, query=None, using=None):