Commit 95baf32a authored by Renán Sosa Guillen's avatar Renán Sosa Guillen

db populated

parent d258ce5d
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
......@@ -8,17 +8,17 @@ class Command(BaseCommand):
def handle(self, *args, **options):
#base path
base_path = '/home/emmanuelhp/Documentos/geojson/'
base_path = '/home/geointdev/sidt-env/geojson/'
# loads files
for index in range(1,33):
with open(base_path + str(index)+'.geojson') as f:
data = json.load(f)
# print "Estado: ", data['name']
print ("Index: ", index)
for feat in data['features']:
polygon = Polygon(
name = feat['properties']['NOMGEO'],
json_info = feat
json_info = json.dumps(feat, ensure_ascii=True)
)
polygon.save()
......
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
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