Skip to content
Makefile 677 B
Newer Older
Bengfort's avatar
Bengfort committed
VIRTUAL_ENV ?= .venv
MANAGEPY = $(VIRTUAL_ENV)/bin/python manage.py

.PHONY: all
all: install run

.PHONY: run
run:
	$(MANAGEPY) runserver 8001
Bengfort's avatar
Bengfort committed

.PHONY: install
install:
	if [ ! -d "$(VIRTUAL_ENV)" ]; then python3 -m venv "$(VIRTUAL_ENV)"; fi
	$(VIRTUAL_ENV)/bin/pip install -r requirements.txt
	npm install
Bengfort's avatar
Bengfort committed
	$(MANAGEPY) migrate
	$(MANAGEPY) shell -c "from django.contrib.auth.models import User; User.objects.filter(username='admin').exists() or User.objects.create_superuser('admin', 'admin@example.com', 'password')"
Bengfort's avatar
Bengfort committed
	$(MANAGEPY) compilemessages -l de
Bengfort's avatar
Bengfort committed

.PHONY: makemessages
makemessages:
	$(MANAGEPY) makemessages -l de -d django
	$(MANAGEPY) makemessages -l de -d djangojs