saving works now
This commit is contained in:
18
backend/core/management/commands/hello.py
Normal file
18
backend/core/management/commands/hello.py
Normal file
@@ -0,0 +1,18 @@
|
||||
from django.core.management.base import BaseCommand
|
||||
|
||||
|
||||
class Command(BaseCommand):
|
||||
help = 'Print hello world.'
|
||||
|
||||
def add_arguments(self, parser):
|
||||
# Argumento nomeado
|
||||
parser.add_argument(
|
||||
'--awards', '-a',
|
||||
action='store_true',
|
||||
help='Help of awards options.'
|
||||
)
|
||||
|
||||
def handle(self, *args, **options):
|
||||
self.stdout.write('Hello world.')
|
||||
if options['awards']:
|
||||
self.stdout.write('Awards')
|
||||
Reference in New Issue
Block a user