Migration dependant on model files.
This commit is contained in:
parent
f76f5cec75
commit
16e7531ac5
3
Makefile
3
Makefile
@ -8,13 +8,14 @@ SHELL := /bin/bash
|
||||
IGNORE = .git .env
|
||||
PYFILES := $(filter-out $(IGNORE),$(call rwildcard,.,*.py))
|
||||
HTMLFILES := $(filter-out $(IGNORE),$(call rwildcard,.,*.html))
|
||||
MODELS := $(filter-out .git,$(call rwildcard,.,*/models.py))
|
||||
|
||||
$(VENV)/.install: requirements.txt
|
||||
test -d $(VENV) || python3 -m venv $(VENV)
|
||||
$(BIN)/pip install --upgrade -r requirements.txt
|
||||
touch $(VENV)/.install
|
||||
|
||||
$(VENV)/.migrate: $(PYFILES) $(VENV)/.install
|
||||
$(VENV)/.migrate: $(MODELS)
|
||||
$(PYTHON) manage.py makemigrations
|
||||
$(PYTHON) manage.py migrate
|
||||
$(PYTHON) manage.py collectstatic --noinput
|
||||
|
Loading…
Reference in New Issue
Block a user