1. from django.core.management import BaseCommand
    
  2. 
    
  3. 
    
  4. class Command(BaseCommand):
    
  5.     help = "Test suppress base options command."
    
  6.     requires_system_checks = []
    
  7.     suppressed_base_arguments = {
    
  8.         "-v",
    
  9.         "--traceback",
    
  10.         "--settings",
    
  11.         "--pythonpath",
    
  12.         "--no-color",
    
  13.         "--force-color",
    
  14.         "--version",
    
  15.         "file",
    
  16.     }
    
  17. 
    
  18.     def add_arguments(self, parser):
    
  19.         super().add_arguments(parser)
    
  20.         self.add_base_argument(parser, "file", nargs="?", help="input file")
    
  21. 
    
  22.     def handle(self, *labels, **options):
    
  23.         print("EXECUTE:SuppressBaseOptionsCommand options=%s" % sorted(options.items()))