-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathMakefile
29 lines (23 loc) · 865 Bytes
/
Makefile
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
.PHONY: list
list:
@LC_ALL=C $(MAKE) -pRrq -f $(lastword $(MAKEFILE_LIST)) : 2>/dev/null | awk -v RS= -F: '/(^|\n)# Files(\n|$$)/,/(^|\n)# Finished Make data base/ {if ($$1 !~ "^[#.]") {print $$1}}' | sort | egrep -v -e '^[^[:alnum:]]' -e '^$@$$'
migrate:
@python manage.py migrate
admin:
@echo "Creating superuser"
@echo "from django.contrib.auth import get_user_model; get_user_model().objects.create_superuser('admin', '', 'admin')" | python manage.py shell
run:
@python manage.py runserver 0.0.0.0:8000
test:
@echo "Running tests..."
@coverage run manage.py test --deprecation all
@coverage report -m
mail:
@echo "Starting mail server"
@cp tests/local.py.example tests/local.py
@docker run -d -p 8025:8025 -p 1025:1025 --name mailhog mailhog/mailhog
@make run
mail-stop:
@echo "Stopping mail server"
@docker stop mailhog
@docker rm mailhog