forked from Prachit99/PackTravel
-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathMakefile
More file actions
41 lines (34 loc) · 973 Bytes
/
Makefile
File metadata and controls
41 lines (34 loc) · 973 Bytes
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
PYTHON = py # change the python run command according to your system
PIP = pip
PORT = 8080
.PHONY: help
help:
@echo "Makefile for Django Project"
@echo ""
@echo "Usage:"
@echo " make setup Install dependencies, apply migrations, and start the server"
@echo " make install Install Django and dependencies"
@echo " make migrate Apply migrations"
@echo " make run Start the Django development server"
@echo " make tests Run all tests"
@echo ""
# Install Django and other dependencies
.PHONY: install
install:
$(PIP) install -r requirements.txt
$(PIP) install django django-allauth pymongo setuptools --upgrade
# Apply database migrations
.PHONY: migrate
migrate:
$(PYTHON) manage.py migrate
# Start the Django server
.PHONY: run
run:
$(PYTHON) manage.py runserver $(PORT)
# Install, migrate, and run server
.PHONY: setup
setup: install migrate run
# Run all django tests
.PHONY: tests
tests:
$(PYTHON) manage.py test