summaryrefslogtreecommitdiff
path: root/Makefile.example
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile.example')
-rw-r--r--Makefile.example8
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 \