Commit 2088e6c4 authored by Renán Sosa Guillen's avatar Renán Sosa Guillen

check out db structure

parent fceca902
...@@ -29,7 +29,13 @@ class Command(BaseCommand): ...@@ -29,7 +29,13 @@ class Command(BaseCommand):
## base geojson files path ## base geojson files path
base_path = options['geojson_path'][0] base_path = options['geojson_path'][0]
# loading files ## =========================================================================================
## =========================================================================================
"""
CHECK OUT THE NEW DB STRUCTURE BEFORE INSERTING ANY DATA !!!
THERE ARE NEW FIELDS TO TAKE INTO ACCOUNT !!!
"""
## loading files
for index in range(1,33): for index in range(1,33):
with open(base_path + str(index) + ".geojson") as f: with open(base_path + str(index) + ".geojson") as f:
data = json.load(f) data = json.load(f)
...@@ -41,6 +47,8 @@ class Command(BaseCommand): ...@@ -41,6 +47,8 @@ class Command(BaseCommand):
) )
polygon.save() polygon.save()
## =========================================================================================
## =========================================================================================
# print ("============= "+ data['name'] + " ===================") # print ("============= "+ data['name'] + " ===================")
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment