mirror of
https://github.com/django/django.git
synced 2025-06-07 12:39:12 +00:00
Fixed #23873 -- Improved GIS error message when GEOS is not installed.
Thanks Claude for writing the patch.
This commit is contained in:
parent
ab2819aa7b
commit
d2bcb05980
@ -1,6 +1,15 @@
|
|||||||
|
from django.core.exceptions import ImproperlyConfigured
|
||||||
|
|
||||||
# Want to get everything from the 'normal' models package.
|
# Want to get everything from the 'normal' models package.
|
||||||
from django.db.models import * # NOQA
|
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
|
# Geographic aggregate functions
|
||||||
from django.contrib.gis.db.models.aggregates import * # NOQA
|
from django.contrib.gis.db.models.aggregates import * # NOQA
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user