2008-08-06 02:13:06 +08:00
|
|
|
# Getting the normal admin routines, classes, and `site` instance.
|
2013-10-18 19:25:30 +08:00
|
|
|
from django.contrib.admin import ( # NOQA: flake8 detects only the last __all__
|
|
|
|
autodiscover, site, AdminSite, ModelAdmin, StackedInline, TabularInline,
|
|
|
|
HORIZONTAL, VERTICAL,
|
|
|
|
)
|
2008-08-06 02:13:06 +08:00
|
|
|
# Geographic admin options classes and widgets.
|
2013-10-18 19:25:30 +08:00
|
|
|
from django.contrib.gis.admin.options import GeoModelAdmin # NOQA
|
|
|
|
from django.contrib.gis.admin.widgets import OpenLayersWidget # NOQA
|
|
|
|
|
|
|
|
__all__ = [
|
|
|
|
"autodiscover", "site", "AdminSite", "ModelAdmin", "StackedInline",
|
|
|
|
"TabularInline", "HORIZONTAL", "VERTICAL",
|
|
|
|
"GeoModelAdmin", "OpenLayersWidget", "HAS_OSM",
|
|
|
|
]
|
2008-08-06 02:13:06 +08:00
|
|
|
|
|
|
|
try:
|
|
|
|
from django.contrib.gis.admin.options import OSMGeoAdmin
|
|
|
|
HAS_OSM = True
|
2013-10-18 19:25:30 +08:00
|
|
|
__all__ += ['OSMGeoAdmin']
|
2008-08-06 02:13:06 +08:00
|
|
|
except ImportError:
|
|
|
|
HAS_OSM = False
|