Move geocoding to Google API

This commit is contained in:
Arne Schlüter 2015-01-17 19:12:09 +01:00
commit cb0175a7b7
4 changed files with 57 additions and 22 deletions

View file

@ -16,7 +16,17 @@ class Article(BaseModel):
description = TextField()
hash = BlobField(index=True)
class Location(BaseModel):
"""
A location describes the place an incident has happened
"""
confidence = IntegerField()
lat = DoubleField()
lng = DoubleField()
match = CharField()
article = ForeignKeyField(Article)
# Set up the tables
def create_tables():
db.connect()
db.create_tables([Article])
db.create_tables([Article, Location])