feat: 220 colonias reales de Celaya mapeadas a 15 rutas con Haversine
This commit is contained in:
@@ -16,6 +16,14 @@ with open(os.path.join(BASE_DIR, "data", "colonias-rutas.json")) as f:
|
||||
for item in json.load(f):
|
||||
COLONIAS[item["colonia"].lower()] = item
|
||||
|
||||
COLONIAS_COMPLETAS = {}
|
||||
try:
|
||||
with open(os.path.join(BASE_DIR, "data", "colonias-rutas-completo.json")) as f:
|
||||
for item in json.load(f):
|
||||
COLONIAS_COMPLETAS[item["colonia"].lower()] = item
|
||||
except:
|
||||
pass
|
||||
|
||||
def init_rutas(db: Session):
|
||||
for ruta in RUTAS:
|
||||
existe = db.query(models.EstadoRuta).filter_by(route_id=ruta["routeId"]).first()
|
||||
|
||||
Reference in New Issue
Block a user