Skip to content

Commit

Permalink
renamed gis_properly_configured in GEODJANGO_INSTALLED
Browse files Browse the repository at this point in the history
  • Loading branch information
nemesifier committed Jan 23, 2014
1 parent b7205b0 commit 00fa844
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
6 changes: 3 additions & 3 deletions django_hstore/managers.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand All @@ -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.
Expand Down
10 changes: 5 additions & 5 deletions django_hstore/query.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down Expand Up @@ -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):
Expand All @@ -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):
Expand Down Expand Up @@ -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):
Expand Down

0 comments on commit 00fa844

Please sign in to comment.