| 414 | File = open(import_file, "r") |
| 415 | resource.import_xml(File, format="csv", stylesheet=stylesheet) |
| 416 | db.commit() |
| 417 | gis.update_location_tree() |
| 418 | db.commit() |
| 419 | }}} |
| 420 | |
| 421 | === Mongolia === |
| 422 | Admin Boundaries: |
| 423 | * [http://eden.sahanafoundation.org/downloads/MN_Lx.7z MN_Lx.7z] |
| 424 | |
| 425 | These have come originally from [https://cod.humanitarianresponse.info COD] with the names updated from Wikipedia....and the 1994 creation of Govisümber noted. |
| 426 | |
| 427 | Use [http://7zip.org 7-Zip] to extract to your web2py folder & then install like this: |
| 428 | {{{ |
| 429 | cd /home/web2py |
| 430 | p7zip -d MN_Lx.7z |
| 431 | python web2py.py -S eden -M |
| 432 | |
| 433 | auth.override = True |
| 434 | languages = s3.l10n_languages |
| 435 | languages["mn"] = "Mongolian" |
| 436 | resource = s3db.resource("gis_location") |
| 437 | stylesheet = os.path.join(request.folder, "static", "formats", "s3csv", "gis", "location.xsl") |
| 438 | import_file = "MN_L0.csv" |
| 439 | File = open(import_file, "r") |
| 440 | resource.import_xml(File, format="csv", stylesheet=stylesheet) |
| 441 | db.commit() |
| 442 | import_file = "MN_L1.csv" |
| 443 | File = open(import_file, "r") |
| 444 | resource.import_xml(File, format="csv", stylesheet=stylesheet) |
| 445 | db.commit() |
| 446 | import_file = "MN_L2.csv" |