Created
September 26, 2012 18:12
-
-
Save allenluce-zz/3789608 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from repoze.lemonade.content import create_content | |
from opencore.models.interfaces import IProfile | |
from opencore.security.policy import to_profile_active | |
groups = ('group.KarlStaff',) | |
lastname = "Reynolds" | |
email = "[email protected]" | |
users = root.users | |
profiles = root['profiles'] | |
for i in range(100): | |
login = "runbob%d" % (i + 2) | |
firstname = "No Bob Number%d" % i | |
users.add(login, login, login, groups) | |
profile = profiles[login] = create_content(IProfile, | |
firstname=firstname, | |
lastname=lastname, | |
email=email, | |
) | |
to_profile_active(profile) | |
import transaction | |
transaction.commit() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment