summaryrefslogtreecommitdiff
path: root/Makefile.example
blob: 4ac65cbdbada4993378f64eb10503b306108e918 (plain)
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
SHELL := /bin/bash

# if a virtualenv is used put the full python path
# e.g.: PYTHON=$$HOME/.virtualenvs/chimere/bin/python
PYTHON=python
# put name of your current project
project=chimere_example_project

update: clean syncdb compilemessages collectstatic

clean:
	-rm -rf *~*
	-find . -name '*.pyc' -exec rm {} \;
	-find . -name '.*.swp' -exec rm {} \;

test: clean
	cd $(project); $(PYTHON) manage.py test chimere

test_gitlab:
	cd $(project); $(PYTHON) manage.py test chimere

pep8:
	pep8 --filename=*.py --ignore=W --exclude="manage.py,settings.py,migrations" --statistics --repeat .

pylint:
	pylint "$(CURDIR)/chimere" --ignore=.git,migrations --max-public-methods=50 --ignored-classes=Item.Meta --method-rgx='[a-z_][a-z0-9_]{2,40}$$'

fresh_syncdb:
	cd $(project); $(PYTHON) ./manage.py syncdb --noinput 2> /dev/null > /dev/null
	cd $(project); $(PYTHON) ./manage.py migrate chimere 2> /dev/null > /dev/null

syncdb:
	cd $(project); $(PYTHON) manage.py syncdb --noinput
	cd $(project); $(PYTHON) manage.py migrate

shell:
	cd $(project);$(PYTHON) manage.py shell

run:
	cd $(project); $(PYTHON) manage.py runserver 0.0.0.0:8000

compilemessages:
	cd $(CURDIR)/chimere; \
	$(PYTHON) ../$(project)/manage.py compilemessages

collectstatic:
	cd $(CURDIR)/chimere; \
	$(PYTHON) ../$(project)/manage.py collectstatic --noinput