<filename>example/SocialExample/project/apps/utils/management/commands/createsuperuser.py
from django.core.management.base import BaseCommand
from django.contrib.auth.models import User

class Command(BaseCommand):
    help = "Create a new superuser without prompting the user for input"

    def handle(self, *args, **options):
        user = User(username="admin", email="<EMAIL>",
                    is_superuser=True, is_staff=True)
        user.set_password("<PASSWORD>")
        user.save()

        self.stdout.write("Created admin: admin\n")

<filename>example/SocialExample/project/apps/utils/management/commands/createsuperuser.py
from django.core.management.base import BaseCommand
from django.contrib.auth.models import User

class Command(BaseCommand):
    help = "Create a new superuser without prompting the user for input"

    def handle(self, *args, **options):
        user = User(username="admin", email="<EMAIL>",
                    is_superuser=True, is_staff=True)
        user.set_password("<PASSWORD>")
        user.save()

        self.stdout.write("Created admin: admin\n")
