mirror of
https://github.com/heyarne/berliner-winter.git
synced 2026-05-06 19:23:39 +02:00
15 lines
412 B
Python
15 lines
412 B
Python
import bottle
|
|
from json import dumps
|
|
from models import *
|
|
|
|
@bottle.get('/locations/<article_id:int>')
|
|
def location(article_id):
|
|
return (Location
|
|
.select()
|
|
.where(Location.article == article_id)
|
|
.order_by(Location.confidence.desc(), Location.id.asc())
|
|
.dicts()
|
|
.get())
|
|
|
|
if __name__ == '__main__':
|
|
bottle.run(host='localhost', port=12345, reloader=True, debug=True)
|