mirror of
https://github.com/heyarne/berliner-winter.git
synced 2026-05-06 19:23:39 +02:00
Move geocoding to Google API
This commit is contained in:
parent
13ac77b575
commit
cb0175a7b7
4 changed files with 57 additions and 22 deletions
12
models.py
12
models.py
|
|
@ -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])
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue