summaryrefslogtreecommitdiff
path: root/Makefile.example
diff options
context:
space:
mode:
authorÉtienne Loks <etienne.loks@iggdrasil.net>2024-04-12 14:48:48 +0200
committerÉtienne Loks <etienne.loks@iggdrasil.net>2024-04-16 16:43:03 +0200
commit7a0095af4b5adede6716f18e1053f8366cf1df65 (patch)
tree9fc8d2da237093c3f598eef37f32a3241261f621 /Makefile.example
parent93ac69d1fe8c18ab37889f0387a128d65c3eefa0 (diff)
downloadIshtar-7a0095af4b5adede6716f18e1053f8366cf1df65.tar.bz2
Ishtar-7a0095af4b5adede6716f18e1053f8366cf1df65.zip
📝 documentation: auto-generated db graph in order to decorate your office
Diffstat (limited to 'Makefile.example')
-rw-r--r--Makefile.example11
1 files changed, 6 insertions, 5 deletions
diff --git a/Makefile.example b/Makefile.example
index 7d616853e..95f390e6f 100644
--- a/Makefile.example
+++ b/Makefile.example
@@ -9,7 +9,7 @@ export PATH := $(HOME)/bin/geckodriver:$(PATH)
# put name of your current project
project=example_project
# list used apps
-apps="archaeological_operations" "ishtar_common" "archaeological_context_records" "archaeological_files" "archaeological_finds" "archaeological_warehouse"
+apps="ishtar_common" "archaeological_operations" "archaeological_context_records" "archaeological_files" "archaeological_finds" "archaeological_warehouse"
default_data='fr'
version=`head -n 1 version.py | cut -d' ' -f2`
branch_name=`git branch --no-color 2> /dev/null | sed -e '/^[^*]/d' -e "s/* \(.*\)/\1/"`
@@ -43,6 +43,9 @@ migrations: ## generate database migrations
migrate: ## migrate database
cd $(project); $(PYTHON) manage.py migrate
+fake_migrate: ## fake migration
+ cd $(project); $(PYTHON) manage.py migrate --fake
+
collectstatic: ## collect all static files
cd $(project);$(PYTHON) manage.py collectstatic --noinput
@@ -61,15 +64,13 @@ build_doc_values:
build_doc_model_graph:
cd $(project);\
- echo 'exec(open("../docs/generate_values_doc.py").read())' | $(PYTHON) ./manage.py shell
- cd $(project);\
$(PYTHON) manage.py graph_models --pydot -g -I "ImporterModel,ImporterType,ImporterDefault,ImporterDefaultValues,ImporterColumn,Regexp,ImportTarget,FormaterType,Import" ishtar_common > /tmp/ishtar-imports.dot ;\
dot -Tsvg /tmp/ishtar-imports.dot -o ../docs/source/_static/db-imports.svg
rm /tmp/ishtar-imports.dot
cd $(project);\
for APP in $(apps); do \
- $(PYTHON) manage.py graph_models -g --pydot $$APP > /tmp/ishtar-$$APP.dot; \
- dot -Tsvg /tmp/ishtar-$$APP.dot -o ../docs/source/_static/db-$$APP.svg; \
+ $(PYTHON) manage.py graph_models -g --pydot --output /tmp/ishtar-$$APP.dot $$APP; \
+ dot -Tsvg /tmp/ishtar-$$APP.dot -o ../docs/ressources/db-$$APP.svg; \
rm /tmp/ishtar-$$APP.dot ; \
done