comparison bandmap/admin.py @ 991:4aadaf3bc234

Added SITE_SCHEME setting. Configure site scheme to be either http or https based on SITE_SCHEME setting. Updated code to use it.
author Brian Neal <bgneal@gmail.com>
date Sun, 01 Nov 2015 15:56:05 -0600
parents 09ed84a7394c
children
comparison
equal deleted inserted replaced
990:81b96f3c9e59 991:4aadaf3bc234
47 """Admin action to refresh the lat/lon fields after updating the 47 """Admin action to refresh the lat/lon fields after updating the
48 location field. Queries the Google Maps HTTP server-side API for the 48 location field. Queries the Google Maps HTTP server-side API for the
49 data. 49 data.
50 50
51 """ 51 """
52 base_url = "http://maps.googleapis.com/maps/api/geocode/json?address=%s" 52 base_url = "https://maps.googleapis.com/maps/api/geocode/json?address=%s"
53 ok_cnt = 0 53 ok_cnt = 0
54 for band in qs: 54 for band in qs:
55 url = base_url % urllib.quote_plus(band.location) 55 url = base_url % urllib.quote_plus(band.location)
56 try: 56 try:
57 response = urllib2.urlopen(url) 57 response = urllib2.urlopen(url)