1
0
mirror of https://github.com/django/django.git synced 2025-10-31 09:41:08 +00:00

Removed legacy shortcut for importing GeoIP.

This commit is contained in:
Aymeric Augustin
2012-12-24 22:57:49 +01:00
parent d4ea02b992
commit b2d20e9826
3 changed files with 21 additions and 52 deletions

View File

@@ -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

View File

@@ -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)