mirror of
https://github.com/django/django.git
synced 2025-11-19 19:24:46 +00:00
Fixed #36577 -- Removed obsolete try-except for GIS layermapping imports.
Some checks are pending
Docs / spelling (push) Waiting to run
Docs / blacken-docs (push) Waiting to run
Docs / lint-docs (push) Waiting to run
Linters / flake8 (push) Waiting to run
Linters / isort (push) Waiting to run
Linters / black (push) Waiting to run
Tests / Windows, SQLite, Python 3.13 (push) Waiting to run
Tests / JavaScript tests (push) Waiting to run
Some checks are pending
Docs / spelling (push) Waiting to run
Docs / blacken-docs (push) Waiting to run
Docs / lint-docs (push) Waiting to run
Linters / flake8 (push) Waiting to run
Linters / isort (push) Waiting to run
Linters / black (push) Waiting to run
Tests / Windows, SQLite, Python 3.13 (push) Waiting to run
Tests / JavaScript tests (push) Waiting to run
This commit is contained in:
parent
4f07767106
commit
d8426f64a7
1 changed files with 3 additions and 11 deletions
|
|
@ -2,24 +2,16 @@
|
|||
This module contains useful utilities for GeoDjango.
|
||||
"""
|
||||
|
||||
from django.contrib.gis.utils.layermapping import LayerMapError, LayerMapping
|
||||
from django.contrib.gis.utils.ogrinfo import ogrinfo
|
||||
from django.contrib.gis.utils.ogrinspect import mapping, ogrinspect
|
||||
from django.contrib.gis.utils.srs import add_srs_entry
|
||||
from django.core.exceptions import ImproperlyConfigured
|
||||
|
||||
__all__ = [
|
||||
"add_srs_entry",
|
||||
"mapping",
|
||||
"ogrinfo",
|
||||
"ogrinspect",
|
||||
"LayerMapError",
|
||||
"LayerMapping",
|
||||
]
|
||||
|
||||
try:
|
||||
# LayerMapping requires DJANGO_SETTINGS_MODULE to be set,
|
||||
# and ImproperlyConfigured is raised if that's not the case.
|
||||
from django.contrib.gis.utils.layermapping import LayerMapError, LayerMapping
|
||||
|
||||
__all__ += ["LayerMapError", "LayerMapping"]
|
||||
|
||||
except ImproperlyConfigured:
|
||||
pass
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue