| 1 |
from django.core.management.base import BaseCommand |
| 2 |
|
| 3 |
|
| 4 |
class Command(BaseCommand): |
| 5 |
help = "Test basic commands" |
| 6 |
requires_system_checks = [] |
| 7 |
|
| 8 |
def add_arguments(self, parser): |
| 9 |
parser.add_argument("args", nargs="*") |
| 10 |
parser.add_argument("--option_a", "-a", default="1") |
| 11 |
parser.add_argument("--option_b", "-b", default="2") |
| 12 |
parser.add_argument("--option_c", "-c", default="3") |
| 13 |
|
| 14 |
def handle(self, *labels, **options): |
| 15 |
print( |
| 16 |
"EXECUTE:BaseCommand labels=%s, options=%s" |
| 17 |
% (labels, sorted(options.items())) |
| 18 |
) |