You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

28 lines
919 B

# Define default environment variables
DJANGO_SETTINGS_MODULE ?= dev
# Default target
.PHONY: help
help:
@echo "Available commands:"
@echo " make run - Run the Django development server"
@echo " make migrate - Apply database migrations"
@echo " make createsuperuser - Create a Django superuser"
# Run the development server
.PHONY: run
run:
@echo "Running Django server with settings: $(DJANGO_SETTINGS_MODULE)"
DJANGO_SETTINGS_MODULE=$(DJANGO_SETTINGS_MODULE) python manage.py runserver
# Apply migrations
.PHONY: migrate
migrate:
@echo "Applying migrations with settings: $(DJANGO_SETTINGS_MODULE)"
DJANGO_SETTINGS_MODULE=$(DJANGO_SETTINGS_MODULE) python manage.py migrate
# Create a superuser
.PHONY: createsuperuser
createsuperuser:
@echo "Creating superuser with settings: $(DJANGO_SETTINGS_MODULE)"
DJANGO_SETTINGS_MODULE=$(DJANGO_SETTINGS_MODULE) python manage.py createsuperuser