def users_login(self, **kwargs): kwargs.update({ 'tenant': kwargs.get('tenant', self.tenant), 'teams': kwargs.get('teams') if kwargs.get('teams') else iterator(self.users_team), 'is_active': kwargs.get('is_active', True), 'email': '*****@*****.**' % self.tenant.pk, }) user = LilyUserFactory.create(**kwargs) self.stdout.write('\nYou can now login as a normal user in %(tenant)s with:\n%(email)s\n%(password)s\n' % { 'tenant': self.tenant, 'email': user.email, 'password': '******' }) kwargs['email'] = '*****@*****.**' % self.tenant.pk superuser = LilySuperUserFactory.create(**kwargs) self.stdout.write('\nYou can now login as a superuser in %(tenant)s with:\n%(email)s\n%(password)s\n\n' % { 'tenant': self.tenant, 'email': superuser.email, 'password': '******' }) return [user, superuser]
def users_login(self, **kwargs): kwargs.update( { "tenant": kwargs.get("tenant", self.tenant), "teams": kwargs.get("teams") if kwargs.get("teams") else iterator(self.users_team), "is_active": kwargs.get("is_active", True), "email": "*****@*****.**" % self.tenant.pk, } ) user = LilyUserFactory.create(**kwargs) self.stdout.write( "\nYou can now login as a normal user in %(tenant)s with:\n%(email)s\n%(password)s\n" % {"tenant": self.tenant, "email": user.email, "password": "******"} ) kwargs["email"] = "*****@*****.**" % self.tenant.pk superuser = LilySuperUserFactory.create(**kwargs) self.stdout.write( "\nYou can now login as a superuser in %(tenant)s with:\n%(email)s\n%(password)s\n\n" % {"tenant": self.tenant, "email": superuser.email, "password": "******"} ) return [user, superuser]
def superusers(self, size, tenant): LilySuperUserFactory.create_batch(size, tenant=tenant) user = LilySuperUserFactory.create(tenant=tenant, is_active=True, email='*****@*****.**' % tenant.pk) self.stdout.write('\nYou can now login as a superuser in %(tenant)s with:\n%(email)s\n%(password)s\n\n' % { 'tenant': tenant, 'email': user.email, 'password': '******' })
def superusers(self, size, tenant): LilySuperUserFactory.create_batch(size, tenant=tenant) user = LilySuperUserFactory.create(tenant=tenant, is_active=True, email='*****@*****.**' % tenant.pk) self.stdout.write( '\nYou can now login as a superuser in %(tenant)s with:\n%(email)s\n%(password)s\n\n' % { 'tenant': tenant, 'email': user.email, 'password': '******' })