parts/django/tests/regressiontests/admin_scripts/management/commands/base_command.py
equal
deleted
inserted
replaced
|
1 from django.core.management.base import BaseCommand |
|
2 from optparse import make_option |
|
3 |
|
4 class Command(BaseCommand): |
|
5 option_list = BaseCommand.option_list + ( |
|
6 make_option('--option_a','-a', action='store', dest='option_a', default='1'), |
|
7 make_option('--option_b','-b', action='store', dest='option_b', default='2'), |
|
8 make_option('--option_c','-c', action='store', dest='option_c', default='3'), |
|
9 ) |
|
10 help = 'Test basic commands' |
|
11 requires_model_validation = False |
|
12 args = '[labels ...]' |
|
13 |
|
14 def handle(self, *labels, **options): |
|
15 print 'EXECUTE:BaseCommand labels=%s, options=%s' % (labels, sorted(options.items())) |