-
Notifications
You must be signed in to change notification settings - Fork 13
/
Makefile
32 lines (24 loc) · 849 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
30
31
32
.PHONY: runserver migrate shell createsuperuser
TAG="\n\n\033[0;32m\#\#\# "
END=" \#\#\# \033[0m\n"
HOST=0.0.0.0
PORT=8080
PYTHONPATH=django_practice_2
DJANGO_SETTINGS=django_practice_2.settings
# django-command = django-admin $(1) $(HOST):$(PORT) --settings $(DJANGO_SETTINGS) --pythonpath $(PYTHONPATH)
django-command = django-admin $(1) $(2) --settings $(DJANGO_SETTINGS) --pythonpath $(PYTHONPATH)
runserver:
@echo $(TAG)Running Server $(END)
$(call django-command, runserver, $(HOST):$(PORT))
shell:
@echo $(TAG)Running Shell $(END)
$(call django-command, shell)
migrate:
@echo $(TAG)Migrating Database$(END)
$(call django-command, migrate)
makemigrations:
@echo $(TAG)Creating Migrations$(END)
$(call django-command, makemigrations)
createsuperuser:
@echo $(TAG)Create Superuser$(END)
$(call django-command, createsuperuser)