-
Notifications
You must be signed in to change notification settings - Fork 0
/
create_fixtures.sh
executable file
·32 lines (23 loc) · 1.05 KB
/
create_fixtures.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#!/usr/bin/env bash
# create_fixtures.sh
# make sure you ran `pip install django-fixture-magic` and added `'fixture_magic'` to INSTALLED_APPS
source env/bin/activate
echo "create fixtures_stelle"
python manage.py dump_object archiv.stelle 808 860 > fixtures_stelle.json
echo "create fixtures_spatialcoverage"
python manage.py dump_object archiv.spatialcoverage 4 5 > fixtures_spatialcoverage.json
echo "create fixtures_keyword"
python manage.py dump_object archiv.keyword 28 > fixtures_keyword.json
echo "create fixtures_layer"
python manage.py dump_object layers.geojsonlayer 7 3 > fixtures_layer.json
echo "create fixtures_usecase"
python manage.py dump_object archiv.usecase 14 > fixtures_usecase.json
echo "merging fixtures"
python manage.py merge_fixtures fixtures_stelle.json fixtures_spatialcoverage.json fixtures_keyword.json fixtures_layer.json fixtures_usecase.json > archiv/fixtures/dump.json
echo "delete fixtures"
rm fixtures_keyword.json
rm fixtures_spatialcoverage.json
rm fixtures_stelle.json
rm fixtures_layer.json
rm fixtures_usecase.json
echo "done"