20 lines
620 B
Python
Executable File
20 lines
620 B
Python
Executable File
from django.core.management.base import BaseCommand
|
|
from at_django_boilerplate.accounts.models import CustomUser
|
|
from django.db.utils import IntegrityError
|
|
|
|
|
|
class Command(BaseCommand):
|
|
help = 'Add predefined tags to the database'
|
|
|
|
def handle(self, *args, **kwargs):
|
|
tmp = CustomUser.objects.create(email='admin@rys.com',first_name='Admin',last_name='User')
|
|
tmp.save()
|
|
tmp.set_password('1234')
|
|
tmp.is_superuser = True
|
|
tmp.is_active = True
|
|
tmp.is_staff = True
|
|
tmp.save()
|
|
|
|
|
|
self.stdout.write(self.style.SUCCESS("✅ Seeded Accounts & Businesses"))
|