From 2391b5a504502cb26c8188ac933b35c82621eb89 Mon Sep 17 00:00:00 2001 From: Philip Sargent Date: Thu, 11 Nov 2021 19:34:59 +0200 Subject: [PATCH] Django 'command' system docm --- core/management/commands/dummycmd.py | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/core/management/commands/dummycmd.py b/core/management/commands/dummycmd.py index 0721ec6..3628cf8 100644 --- a/core/management/commands/dummycmd.py +++ b/core/management/commands/dummycmd.py @@ -9,8 +9,19 @@ from django.contrib.auth.models import User import settings """this is now replaced by databaseRest.py -I don't know why this still exists. Needs testing to see if -removing it makes django misbehave. + +This is an example of how to create our own bespoke commandline +commands. + +Good articles on creating Django commands at +https://www.mattlayman.com/understand-django/command-apps/ +https://www.geeksforgeeks.org/custom-django-management-commands/ + +Django docs: +https://docs.djangoproject.com/en/3.2/howto/custom-management-commands/ + +We might use this mechanism to replace/enhance the +folk, wallets and any cron jobs or other standalone scripts. """ class Command(BaseCommand):