Changes between Initial Version and Version 4 of Ticket #19168
- Timestamp:
- Nov 13, 2012, 4:22:43 PM (12 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #19168
- Property Status new → reopened
- Property Triage Stage Unreviewed → Accepted
-
Ticket #19168 – Description
initial v4 2 2 3 3 Here is example: 4 {{{ 4 5 # Settings 5 6 GEOIP_PATH = os.path.join(PROJECT_DIR, 'bin', 'GeoIP') 6 7 GEOIP_COUNTRY = 'GeoIP.dat' 7 8 GEOIP_CITY = 'GeoLiteCity.dat' 9 }}} 8 10 11 {{{ 9 12 In [1]: from django.contrib.gis.geoip import GeoIP 10 13 In [2]: geo = GeoIP() … … 17 20 In [6]: geo.city('8.8.8.8') 18 21 Invalid database type GeoIP Country Edition, expected GeoIP City Edition, Rev 1 22 }}} 19 23 20 24 Doing same thing passing the path as parameters: 21 25 26 {{{ 22 27 In [7]: geo = GeoIP(city='/Users/tejindersingh/Projects/kyb/bin/GeoIP/GeoLiteCity.dat', country='/Users/tejindersingh/Projects/kyb/bin/GeoIP/GeoIP.dat') 23 28 In [8]: geo.info … … 41 46 'postal_code': u'94043', 42 47 'region': u'CA'} 48 }}} 43 49 44 50 This happens under ox X mountain lion and with kyngchaos gis/gdal binary packages as well as self compile brews.