1from django.core.management.base import BaseCommand, CommandError
2from django.contrib.auth.models import User
3
4class Command(BaseCommand):
5
6 def handle(self, *args, **options):
7
8 # The magic line
9 User.objects.create_user(username= 'rmx',
10 email='superuser@super.com',
11 password='rmx55',
12 is_staff=True,
13 is_active=True,
14 is_superuser=True
15 )
16