Hi, hope can help me. I already import and convert a CSV file to auth_user 
with  this code. I don´t know how to automatically assign to a group this 
users when I import the CSV to kardex db? or I need to do it after they are 
all at auth_user db?

The kardex have more than 500 users thats why I need an easy way to assign 
a group to all of them.

Any idea of how to do it?

Thanks

db.define_table('kardex',
Field('first_name'),
Field('last_name'),
Field('email', requires=IS_EMAIL(
error_message='invalid email!')),
Field('password')
)
for kardex in db(db.kardex).select():
db.auth_user.validate_and_insert(
first_name=kardex.first_name, last_name=kardex.last_name, email=kardex.email, 
password=kardex.password)



-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to