MCPcopy
hub / github.com/django/django / handle

Method handle

tests/user_commands/management/commands/dance.py:15–25  ·  view source on GitHub ↗
(self, *args, **options)

Source from the content-addressed store, hash-verified

13 parser.add_argument("--opt-3", action="store_true", dest="option3")
14
15 def handle(self, *args, **options):
16 example = options["example"]
17 if example == "raise":
18 raise CommandError(returncode=3)
19 if options["verbosity"] > 0:
20 self.stdout.write("I don't feel like dancing %s." % options["style"])
21 self.stdout.write(",".join(options))
22 if options["integer"] > 0:
23 self.stdout.write(
24 "You passed %d as a positional argument." % options["integer"]
25 )

Callers

nothing calls this directly

Calls 3

CommandErrorClass · 0.90
writeMethod · 0.45
joinMethod · 0.45

Tested by

no test coverage detected