-
Notifications
You must be signed in to change notification settings - Fork 5
/
Makefile
86 lines (68 loc) · 1.67 KB
/
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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
-include Makefile.def
# targets
.PHONY: manage run mailserver syncdb shell test clean migrate init_migrate loaddata help
manage:
ifndef CMD
@echo Please, specify -e CMD=command argument to execute
else
$(MANAGE) $(CMD)
endif
static:
@echo collecting static
$(MANAGE) collectstatic --noinput
run:
@echo Starting $(PROJECT_NAME) ...
$(MANAGE) runserver $(BIND_TO):$(BIND_PORT)
mailserver:
python -m smtpd -n -c DebuggingServer $(BIND_TO):$(MAILSERVER_PORT)
celery:
celery -A p2psafety_django.p2psafety worker -l info
syncdb:
@echo Syncing...
$(MANAGE) syncdb --noinput
$(MANAGE) migrate
@echo Done
shell:
@echo Starting shell...
$(MANAGE) shell
test:
TESTING=1 $(TEST) --noinput $(TEST_OPTIONS)
coverage:
TESTING=1 coverage run --source='.' p2psafety_django/manage.py test
coverage report -m
testone:
$(TEST) $(filter-out $@,$(MAKECMDGOALS))
clean:
@echo Cleaning up...
find . -name "*.pyc" -exec rm -rf {} \;
@echo Done
migrate:
ifndef APP_NAME
@echo You can also specify -e APP_NAME=some_app
$(MANAGE) migrate
else
@echo Starting of migration of $(APP_NAME)
$(MANAGE) schemamigration $(APP_NAME) --auto
$(MANAGE) migrate $(APP_NAME)
@echo Done
endif
init_migrate:
ifndef APP_NAME
@echo Please, specify -e APP_NAME=appname argument
else
@echo Starting init migration of $(APP_NAME)
$(MANAGE) schemamigration $(APP_NAME) --initial
$(MANAGE) migrate $(APP_NAME)
@echo Done
endif
loaddata:
@echo Load data from fixtures ...
$(MANAGE) loaddata $(FIXTURES)
makemessages:
@echo Preparing .po files ...
cd p2psafety_django && python manage.py makemessages --all
compilemessages:
@echo Preparing .mo files ...
$(MANAGE) compilemessages
help:
@cat INSTALL.rst