diff options
Diffstat (limited to 'tests/user_commands/management/commands/required_option.py')
| -rw-r--r-- | tests/user_commands/management/commands/required_option.py | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/user_commands/management/commands/required_option.py b/tests/user_commands/management/commands/required_option.py new file mode 100644 index 0000000000..3b30ed942e --- /dev/null +++ b/tests/user_commands/management/commands/required_option.py @@ -0,0 +1,11 @@ +from django.core.management.base import BaseCommand + + +class Command(BaseCommand): + + def add_arguments(self, parser): + parser.add_argument('-n', '--need-me', required=True) + parser.add_argument('-t', '--need-me-too', required=True, dest='needme2') + + def handle(self, *args, **options): + self.stdout.write(','.join(options)) |
