2011-10-14 02:51:33 +08:00
|
|
|
from django.core.management.base import BaseCommand
|
|
|
|
|
|
|
|
|
2008-07-10 20:12:41 +08:00
|
|
|
class Command(BaseCommand):
|
|
|
|
help = 'Test basic commands'
|
2014-01-20 10:45:21 +08:00
|
|
|
requires_system_checks = False
|
2014-06-07 04:39:33 +08:00
|
|
|
|
|
|
|
def add_arguments(self, parser):
|
|
|
|
parser.add_argument('args', nargs='*')
|
|
|
|
parser.add_argument('--option_a', '-a', default='1')
|
|
|
|
parser.add_argument('--option_b', '-b', default='2')
|
|
|
|
parser.add_argument('--option_c', '-c', default='3')
|
2008-07-10 20:12:41 +08:00
|
|
|
|
|
|
|
def handle(self, *labels, **options):
|
2012-04-29 00:02:01 +08:00
|
|
|
print('EXECUTE:BaseCommand labels=%s, options=%s' % (labels, sorted(options.items())))
|