예제 #1
0
    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]
예제 #2
0
    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]
예제 #3
0
    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]
예제 #4
0
 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': '******'
     })
예제 #5
0
 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': '******'
         })