<gh_stars>0
from django.contrib.auth.models import User
from django.core.management.base import BaseCommand


class Command(BaseCommand):
    """
    Command for creating default superuser
    """

    def handle(self, *args, **options):
        if not User.objects.filter(username="admin").exists():
            User.objects.create_superuser("admin", "<EMAIL>", "admin123456")
            self.stdout.write(self.style.SUCCESS("Superuser created"))

from django.contrib.auth.models import User
from django.core.management.base import BaseCommand


class Command(BaseCommand):
    """
    Command for creating default superuser
    """

    def handle(self, *args, **options):
        if not User.objects.filter(username="admin").exists():
            User.objects.create_superuser("admin", "<EMAIL>", "admin123456")
            self.stdout.write(self.style.SUCCESS("Superuser created"))
Command for creating default superuser