summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--django/contrib/gis/db/models/__init__.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/django/contrib/gis/db/models/__init__.py b/django/contrib/gis/db/models/__init__.py
index 835e907526..9be4a18e03 100644
--- a/django/contrib/gis/db/models/__init__.py
+++ b/django/contrib/gis/db/models/__init__.py
@@ -1,6 +1,15 @@
+from django.core.exceptions import ImproperlyConfigured
+
# Want to get everything from the 'normal' models package.
from django.db.models import * # NOQA
+from django.contrib.gis.geos import HAS_GEOS
+
+if not HAS_GEOS:
+ raise ImproperlyConfigured(
+ "GEOS is required and has not been detected. Are you sure it is installed? "
+ "See also https://docs.djangoproject.com/en/stable/ref/contrib/gis/install/geolibs/")
+
# Geographic aggregate functions
from django.contrib.gis.db.models.aggregates import * # NOQA