# 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