diff options
author | Étienne Loks <etienne.loks@iggdrasil.net> | 2017-10-29 10:14:11 +0100 |
---|---|---|
committer | Étienne Loks <etienne.loks@iggdrasil.net> | 2017-10-29 10:14:11 +0100 |
commit | c7de83a5d3159d938797245b195e10460bce328f (patch) | |
tree | 2ea5ad8a9fe7afcba52ba2d5f6dda3662fd17e56 /Makefile.example | |
parent | e584b93f3da28f1f4df2017ead404855a8b22c92 (diff) | |
download | Ishtar-c7de83a5d3159d938797245b195e10460bce328f.tar.bz2 Ishtar-c7de83a5d3159d938797245b195e10460bce328f.zip |
Makefile: update town fixture generation
Diffstat (limited to 'Makefile.example')
-rw-r--r-- | Makefile.example | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/Makefile.example b/Makefile.example index b3016e8af..9a3e5ccb4 100644 --- a/Makefile.example +++ b/Makefile.example @@ -142,11 +142,13 @@ fixtures_common_importers: > '../ishtar_common/fixtures/initial_importtypes-'$(default_data)'.json' fixtures_common_towns: - cd $(project); $(PYTHON) ./manage.py dumpdata --indent 4 \ - ishtar_common.state \ + cd $(project); $(PYTHON) ./manage.py dumpdata --indent 4 --natural-primary --natural-foreign \ ishtar_common.department \ ishtar_common.town \ - > '../ishtar_common/fixtures/initial_towns-'$(default_data)'.json' + > '../ishtar_common/fixtures/towns-'$(default_data)'.json' + cat 'ishtar_common/fixtures/towns-'$(default_data)'.json' | tr '\n' '\r' | \ + sed -e 's/"children": *\[\r *\[\r *"[0-9]*", *\r *[0-9]*\ *\r *\]\r *\]/"children": []/g' | \ + tr '\r' '\n' > 'ishtar_common/fixtures/towns_norel-'$(default_data)'.json' fixtures_spatialrefsystem: cd $(project); $(PYTHON) ./manage.py dumpdata --indent 4 --natural-primary --natural-foreign \ |