21 lines
510 B
Python
21 lines
510 B
Python
from django.core.management.base import BaseCommand
|
|
|
|
|
|
class Command(BaseCommand):
|
|
help = 'Transfer data between databases'
|
|
|
|
def handle(self, *args, **options):
|
|
if options['short']:
|
|
import __hello__
|
|
else:
|
|
import this
|
|
|
|
def add_arguments(self, parser):
|
|
parser.add_argument(
|
|
'-s',
|
|
'--short',
|
|
action='store_true',
|
|
default=False,
|
|
help='Вывод короткого сообщения'
|
|
)
|