def add_repeater_detail(callsign, detail): db = Database() repeater = db.get_repeater(callsign.upper()) if len(repeater) == 0: return detail print repeater detail['repeater'] = repeater detail['lat'] = float(repeater[0]['lat']) detail['lon'] = float(repeater[0]['lon']) detail['locator'] = repeater[0]['locator'] detail['town'] = repeater[0]['town'] return detail
def api_repeater_json(callsign): db = Database() return jsonify({'repeater': db.get_repeater(callsign.upper())})