def handle(self, *args, **options):
        self.stdout.write(self.style.SUCCESS('Process startes'))

        User = get_user_model()
        admin_user = User.objects.create_superuser(email="*****@*****.**",
                                                   password="******")
        self.stdout.write(self.style.SUCCESS('User created'))

        TicketFactory.create_batch(5)
        TicketFactory.create_batch(5, user=admin_user)
        self.stdout.write(self.style.SUCCESS('Tickets successfully created'))
Exemple #2
0
 def handle(self, *args, **options):
     self.stdout.write(self.style.SUCCESS('Process started'))
     count = options['count'][0]
     TicketFactory.create_batch(count)
     self.stdout.write(self.style.SUCCESS('Tickets successfully created'))