From 0ade95e369ad684fdf058ec26fc020b427a025d2 Mon Sep 17 00:00:00 2001 From: Ken Lippold Date: Fri, 1 Nov 2024 14:50:46 -0700 Subject: [PATCH] Updated setup_admin_user command. --- accounts/management/__init__.py | 0 accounts/management/commands/__init__.py | 0 {core => accounts}/management/commands/setup_admin_user.py | 2 +- 3 files changed, 1 insertion(+), 1 deletion(-) create mode 100644 accounts/management/__init__.py create mode 100644 accounts/management/commands/__init__.py rename {core => accounts}/management/commands/setup_admin_user.py (91%) diff --git a/accounts/management/__init__.py b/accounts/management/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/accounts/management/commands/__init__.py b/accounts/management/commands/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/core/management/commands/setup_admin_user.py b/accounts/management/commands/setup_admin_user.py similarity index 91% rename from core/management/commands/setup_admin_user.py rename to accounts/management/commands/setup_admin_user.py index 5ee9d176..445aeec0 100644 --- a/core/management/commands/setup_admin_user.py +++ b/accounts/management/commands/setup_admin_user.py @@ -17,7 +17,7 @@ def handle(self, *args, **kwargs): password = getattr(settings, 'DEFAULT_SUPERUSER_PASSWORD', 'pass') try: - user_model.objects.create_superuser(username=email, email=email, password=password) + user_model.objects.create_superuser(email=email, password=password) self.stdout.write(self.style.SUCCESS(f'Superuser created: {email}')) except ValidationError as e: self.stdout.write(self.style.ERROR(f'Failed to create default superuser: {e}'))