Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
GeoInt_SIDT
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Mario Chirinos Colunga
GeoInt_SIDT
Commits
2088e6c4
Commit
2088e6c4
authored
Jul 16, 2018
by
Renán Sosa Guillen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
check out db structure
parent
fceca902
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
1 deletion
+9
-1
populate_db.py
catalog/management/commands/populate_db.py
+9
-1
No files found.
catalog/management/commands/populate_db.py
View file @
2088e6c4
...
...
@@ -29,7 +29,13 @@ class Command(BaseCommand):
## base geojson files path
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
):
with
open
(
base_path
+
str
(
index
)
+
".geojson"
)
as
f
:
data
=
json
.
load
(
f
)
...
...
@@ -41,6 +47,8 @@ class Command(BaseCommand):
)
polygon
.
save
()
## =========================================================================================
## =========================================================================================
# print ("============= "+ data['name'] + " ===================")
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment