def handle(self, *args, **options):
        self.make_database_faster()
        create_images = not options['withoutimages']
        for msg in create_shipping_methods():
            self.stdout.write(msg)
        for msg in create_items(self.placeholders_dir, 40, create_images):
            self.stdout.write(msg)
        for msg in create_users(20):
            self.stdout.write(msg)
        for msg in create_orders(20):
            self.stdout.write(msg)

        if options['createsuperuser']:
            credentials = {'email': 'admin@example.com', 'password': 'admin'}
            user, created = User.objects.get_or_create(
                email=credentials['email'], defaults={
                    'is_active': True, 'is_staff': True, 'is_superuser': True})
            if created:
                user.set_password(credentials['password'])
                user.save()
                self.stdout.write(
                    'Superuser - %(email)s/%(password)s' % credentials)
            else:
                self.stdout.write(
                    'Superuser already exists - %(email)s' % credentials)
dataset/ETHPy150Open mirumee/saleor/saleor/core/management/commands/populatedb.py/Command.handle/original