Skip to content

Commit ae40e70

Browse files
authored
Add db seeding from fixtures command to docs (qgis#252)
1 parent ac26d15 commit ae40e70

File tree

2 files changed

+12
-1
lines changed

2 files changed

+12
-1
lines changed

INSTALL.md

+5-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,11 @@ If you have a backup, you can restore it:
2424
```bash
2525
make dbrestore
2626
```
27-
otherwise, you will have to create the superuser, adding menu etc.
27+
28+
otherwise, you can seed initial data from fixtures:
29+
```
30+
make dbseed
31+
```
2832

2933
- Set up python interpreter in PyCharm or just runserver from devweb container:
3034
```bash

dockerize/Makefile

+7
Original file line numberDiff line numberDiff line change
@@ -119,3 +119,10 @@ dbrestore:
119119
@docker exec -t $(PROJECT_ID)-db pg_restore /backups/latest.dmp | docker exec -i $(PROJECT_ID)-db su - postgres -c "psql gis"
120120
@docker-compose -p $(PROJECT_ID) start web
121121
@echo "starting web container"
122+
123+
dbseed:
124+
@echo
125+
@echo "------------------------------------------------------------------"
126+
@echo "Seed db with JSON data from /fixtures/*.json"
127+
@echo "------------------------------------------------------------------"
128+
@docker-compose -p $(PROJECT_ID) exec devweb bash -c 'python manage.py loaddata fixtures/*.json'

0 commit comments

Comments
 (0)