File tree 2 files changed +12
-1
lines changed
2 files changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -24,7 +24,11 @@ If you have a backup, you can restore it:
24
24
``` bash
25
25
make dbrestore
26
26
```
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
+ ```
28
32
29
33
- Set up python interpreter in PyCharm or just runserver from devweb container:
30
34
``` bash
Original file line number Diff line number Diff line change @@ -119,3 +119,10 @@ dbrestore:
119
119
@docker exec -t $(PROJECT_ID ) -db pg_restore /backups/latest.dmp | docker exec -i $(PROJECT_ID ) -db su - postgres -c " psql gis"
120
120
@docker-compose -p $(PROJECT_ID ) start web
121
121
@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'
You can’t perform that action at this time.
0 commit comments