Carlos Aguni

Highly motivated self-taught IT analyst. Always learning and ready to explore new skills. An eternal apprentice.


Makefile Django Helper

17 Nov 2020 »
SHELL=/bin/bash




admin:
	echo " \
	from django.contrib.auth import get_user_model; \
	User = get_user_model(); \
	User.objects.create_superuser('admin', '', 'admin') \
	" | sed 's/^[ \t]*//g' | python manage.py shell

start:
	python manage.py runserver 0:8000

m:
	python manage.py migrate

mm:
	python manage.py makemigrations

mmm: mm m

mm2:
	python manage.py makemigrations
	python manage.py migrate --run-syncdb


shell:
	python manage.py shell
# python manage.py startproject mysite .
# python manage.py startapp products
# Authorization: Token <token>

.ONESHELL: