-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
54 lines (41 loc) · 1.66 KB
/
Makefile
File metadata and controls
54 lines (41 loc) · 1.66 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
MANAGE := python manage.py
.PHONY: help
help: ## Show this help
@egrep -h '\s##\s' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-20s\033[0m %s\n", $$1, $$2}'
.PHONY: venv
venv: ## Make a new virtual environment
pipenv shell
.PHONY: install
install: venv ## Install or update dependencies
pipenv install
freeze: ## Pin current dependencies
pipenv run pip freeze > requirements.txt
migrate: ## Make and run migrations
$(MANAGE) makemigrations
$(MANAGE) migrate
collectstatic: ## Run collectstatic
$(MANAGE) collectstatic --noinput
changepassword: ## Change password superuser
$(MANAGE) changepassword admin@venone.app
.PHONY: createsuperuser
createsuperuser: ## Run the Django server
$(MANAGE) createsuperuser --email="admin@venone.app"
.PHONY: crontabadd
crontabadd: ## Add all defined jobs from CRONJOB to crontab
$(MANAGE) crontab add
.PHONY: crontabshow
crontabshow: ## Show current active jobs of this project
$(MANAGE) crontab show
.PHONY: dumpdata
dumpdata: ## dumpdata on database
$(MANAGE) dumpdata --indent=4 --natural-foreign --natural-primary -e contenttypes --format=yaml users > users/fixtures/users.yaml
$(MANAGE) dumpdata --indent=4 --natural-foreign --natural-primary -e contenttypes --format=yaml tenant > tenant/fixtures/tenants.yaml
$(MANAGE) dumpdata --indent=4 --natural-foreign --natural-primary -e contenttypes --format=yaml houses > houses/fixtures/apartments.yaml
.PHONY: loaddata
loaddata: ## Load default data
$(MANAGE) loaddata fixtures/*.yaml
.PHONY: coverage
coverage: ## Test with coverage and generate htmlcov
coverage run --source "users.tests,houses.tests" manage.py test -v 2
coverage html
coverage report