MCPcopy Create free account
hub / github.com/Flagsmith/flagsmith / handle

Method handle

api/users/management/commands/createinitialadminuser.py:26–51  ·  view source on GitHub ↗
(
        self,
        *args: Any,
        admin_email: str,
        **options: Any,
    )

Source from the content-addressed store, hash-verified

24 )
25
26 def handle(
27 self,
28 *args: Any,
29 admin_email: str,
30 **options: Any,
31 ) -> None:
32 if (
33 not settings.ALLOW_ADMIN_INITIATION_VIA_CLI
34 or should_skip_create_initial_superuser()
35 ):
36 logger.debug("Skipping initial user creation.")
37 return
38 response = create_initial_superuser(
39 admin_email=admin_email,
40 )
41 self.stdout.write(
42 self.style.SUCCESS(
43 'Superuser "%s" created successfully.' % response.user.email
44 )
45 )
46 self.stdout.write(
47 self.style.SUCCESS(
48 "Please go to the following page and choose a password: %s"
49 % response.password_reset_url
50 )
51 )

Callers

nothing calls this directly

Calls 3

create_initial_superuserFunction · 0.90
writeMethod · 0.80

Tested by

no test coverage detected