#################################################
# CREATE USERS
#################################################
def new_user(first_name, last_name, email, passw):
my_crypt = CRYPT(key=auth.settings.hmac_key)
crypt_pass = my_crypt(passw)[0]
id_user= db.auth_user.insert(
first_name=first_name,
last_name=last_name,
email = email,
password = crypt_pass
)
return id_user
#################################################
# LOOP creating 100 users
#################################################
import uuid
for i in range(n):
id_user = new_user('Name%s' % i,'lastName%s' % i ,'[email protected]' %
i ,uuid.uuid4())
2011/3/2 Norbert Klamann <[email protected]>
> Hello all,
> for testing purposes I want to create a bunch of users with a script. How
> can I do this ?
>
> I found nothing in the book, but maybe I searched for the wrong keywords
> ...
>
> Thanks
>
> Norbert
>