(
self,
*args: Any,
admin_email: str,
**options: Any,
)
| 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 | ) |
nothing calls this directly
no test coverage detected