Removed legacy shortcut for importing GeoIP.
This commit is contained in:
parent
d4ea02b992
commit
b2d20e9826
|
@ -14,12 +14,4 @@ if HAS_GDAL:
|
|||
except:
|
||||
pass
|
||||
|
||||
# GeoIP now lives in `django.contrib.gis.geoip`; this shortcut will be
|
||||
# removed in Django 1.6.
|
||||
from django.contrib.gis.utils import geoip
|
||||
HAS_GEOIP = geoip.HAS_GEOIP
|
||||
if HAS_GEOIP:
|
||||
GeoIP = geoip.GeoIP
|
||||
GeoIPException = geoip.GeoIPException
|
||||
|
||||
from django.contrib.gis.utils.wkt import precision_wkt
|
||||
|
|
|
@ -1,14 +0,0 @@
|
|||
import warnings
|
||||
|
||||
from django.contrib.gis import geoip
|
||||
HAS_GEOIP = geoip.HAS_GEOIP
|
||||
if HAS_GEOIP:
|
||||
BaseGeoIP = geoip.GeoIP
|
||||
GeoIPException = geoip.GeoIPException
|
||||
|
||||
class GeoIP(BaseGeoIP):
|
||||
def __init__(self, *args, **kwargs):
|
||||
warnings.warn('GeoIP class has been moved to `django.contrib.gis.geoip`, and '
|
||||
'this shortcut will disappear in Django v1.6.',
|
||||
DeprecationWarning, stacklevel=2)
|
||||
super(GeoIP, self).__init__(*args, **kwargs)
|
|
@ -7,15 +7,6 @@ Geolocation with GeoIP
|
|||
.. module:: django.contrib.gis.geoip
|
||||
:synopsis: High-level Python interface for MaxMind's GeoIP C library.
|
||||
|
||||
.. versionchanged:: 1.4
|
||||
|
||||
.. note::
|
||||
|
||||
In Django 1.4, the :class:`GeoIP` object was moved out of
|
||||
:mod:`django.contrib.gis.utils` and into its own module,
|
||||
:mod:`django.contrib.gis.geoip`. A shortcut is still provided
|
||||
in ``utils``, but will be removed in Django 1.6.
|
||||
|
||||
The :class:`GeoIP` object is a ctypes wrapper for the
|
||||
`MaxMind GeoIP C API`__. [#]_ This interface is a BSD-licensed alternative
|
||||
to the GPL-licensed `Python GeoIP`__ interface provided by MaxMind.
|
||||
|
|
Loading…
Reference in New Issue