2011-09-11 02:04:27 +08:00
|
|
|
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.',
|
2012-05-03 21:27:01 +08:00
|
|
|
DeprecationWarning, stacklevel=2)
|
2011-09-11 02:04:27 +08:00
|
|
|
super(GeoIP, self).__init__(*args, **kwargs)
|