24 lines
571 B
Python
24 lines
571 B
Python
from django.contrib.auth.models import User
|
|
from django.core.management import BaseCommand
|
|
|
|
|
|
def create_users():
|
|
user = User.objects.create_user(
|
|
username="neill",
|
|
is_superuser=True,
|
|
first_name="Neill",
|
|
last_name="Cox",
|
|
email="neill@neill.id.au",
|
|
is_staff=True,
|
|
is_active=True,
|
|
date_joined="2024-07-31T00:00:00.000Z",
|
|
password="password",
|
|
)
|
|
# user.save()
|
|
|
|
|
|
class Command(BaseCommand):
|
|
help = "Load some initial data"
|
|
|
|
def handle(self, *args, **options):
|
|
create_users()
|