From c51756910861e0b613c5b7aa2fde579d696af994 Mon Sep 17 00:00:00 2001 From: Jack Jackson Date: Tue, 22 Nov 2022 13:15:22 -0800 Subject: [PATCH] Create generic Make command to run Django `manage.py` (#886) See https://github.com/grafana/oncall/pull/868 --- Makefile | 3 +++ dev/README.md | 4 ++++ 2 files changed, 7 insertions(+) diff --git a/Makefile b/Makefile index b60a4be8..7fc5b021 100644 --- a/Makefile +++ b/Makefile @@ -166,3 +166,6 @@ run-backend-celery: backend-command: $(call backend_command,$(CMD)) + +backend-manage-command: + $(call backend_command,python manage.py $(CMD)) \ No newline at end of file diff --git a/dev/README.md b/dev/README.md index e8ffa723..9f858e3c 100644 --- a/dev/README.md +++ b/dev/README.md @@ -104,6 +104,10 @@ make dbshell # opens a DB shell make exec-engine # exec into engine container's bash make test # run backend tests +# run Django's `manage.py` script, passing `$CMD` as arguments. +# e.g. `make backend-manage-command makemigrations` - https://docs.djangoproject.com/en/4.1/ref/django-admin/#django-admin-makemigrations +make backend-manage-command CMD="..." + # run both frontend and backend linters # may need to run `yarn install` from within `grafana-plugin` to install several `pre-commit` dependencies make lint