-
Notifications
You must be signed in to change notification settings - Fork 7
/
Makefile
37 lines (28 loc) · 1.03 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
PROJECT_NAME=photoplanet
PYTHONPATH=$(CURDIR):$(CURDIR)/$(PROJECT_NAME)
MANAGE= PYTHONPATH=$(PYTHONPATH) python $(PROJECT_NAME)/manage.py
runserver:
$(MANAGE) runserver --settings=photoplanet.settings.local
shell:
$(MANAGE) shell --settings=photoplanet.settings.local
syncdb:
$(MANAGE) syncdb --settings=photoplanet.settings.local
$(MANAGE) migrate --settings=photoplanet.settings.local
tags:
ctags -R .
# including necessary custom templates if they are not present in the repo
test:
touch photoplanet/templates/photoplanet/custom_headline.html
touch photoplanet/templates/photoplanet/analytics.html
PYTHONPATH=$(PYTHONPATH) \
DJANGO_SETTINGS_MODULE=photoplanet.settings.test \
coverage run --source=$(PROJECT_NAME) $(PROJECT_NAME)/manage.py test $(PROJECT_NAME)
coverage html
load_photos:
$(MANAGE) load_photos --settings=photoplanet.settings.local
rank_photos:
$(MANAGE) rank_photos 200 --settings=photoplanet.settings.local
serve_coverage:
@echo "Browse to http://localhost:4567/"
@cd htmlcov; \
python -m SimpleHTTPServer 4567