From 98a3f7225b8b1265b3255a7e104545ea94e05ab4 Mon Sep 17 00:00:00 2001 From: Étienne Loks Date: Thu, 1 Aug 2019 18:47:59 +0200 Subject: Translations - basic makefile --- Makefile | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 Makefile (limited to 'Makefile') diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..0b7601a --- /dev/null +++ b/Makefile @@ -0,0 +1,26 @@ +PROJECT=commonnet +APPS="commorganization" "commcrawler" +PYTHON=python3 + +help: ## display this help + @awk 'BEGIN {FS = ":.*##"; printf "\nUsage:\n make \033[36m\033[0m\n\nTargets:\n"} /^[a-zA-Z_-]+:.*?##/ { printf " \033[36m%-10s\033[0m %s\n", $$1, $$2 }' $(MAKEFILE_LIST) + +makemessages: ## make messages for translation + for DIR in $(APPS); do \ + cd $(CURDIR)/$$DIR; \ + $(PYTHON) ../manage.py makemessages --all; \ + done + +compilemessages: ## compile messages for translation + for DIR in $(APPS); do \ + cd $(CURDIR)/$$DIR; \ + $(PYTHON) ../manage.py compilemessages ; \ + done + +run: ## run test server + $(PYTHON) manage.py runserver 0.0.0.0:8000 + +generate_graphs: ## generate graph model for documentation + $(PYTHON) manage.py graph_models -g -n -L fr-fr $(APPS) > /tmp/$(PROJECT).dot + dot -Tpng /tmp/$(PROJECT).dot > docs/images/models.png + rm /tmp/$(PROJECT).dot \ No newline at end of file -- cgit v1.2.3