Merge remote-tracking branch 'origin/landing' into landing

Conflicts:
	views/index.html
This commit is contained in:
Tim Head 2014-11-18 15:43:28 +01:00
commit a08f93ff5b
2 changed files with 10 additions and 1 deletions

9
app.py
View File

@ -30,6 +30,15 @@ def showMap(threewords):
return template('index',
err="Could not find location {}".format(threewords))
@get('/latlng/<lat:float>,<lng:float>')
def showMapFromLatLng(lat, lng):
try:
threewords = these.three_words((lat, lng))
return template('map', lat=lat, lng=lng, threewords=threewords)
except:
return template('index',
err="Could not find location {}".format(threewords))
@get('/latlng/<lat:float>,<lng:float>')
def showMapFromLatLng(lat, lng):

View File

@ -11,7 +11,7 @@
<script src="https://maps.googleapis.com/maps/api/js?v=3.exp&libraries=places"></script>
<script src="/static/js/app.js"></script>
</head>
<body>
<body onload="initialize()">
<div class="container">
% if err:
<aside class="alert alert-danger" role="alert">Error: {{ err }}</aside>