Created
July 20, 2020 10:03
-
-
Save bbelderbos/c69c057aab07440c9a485e3e9c9ad248 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from django.core.management.base import BaseCommand | |
# import ORM objects | |
class Command(BaseCommand): | |
help = 'help text' | |
def add_arguments(self, parser): | |
parser.add_argument( | |
'--test', | |
action='store_true', | |
dest='test', | |
help='this is a test switch' | |
) | |
def handle(self, *args, **options): | |
test = options['test'] | |
print('my command') | |
# do stuff |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment