Hello,
I followed the identity-tutorial (http://docs.turbogears.org/1.0/
IdentityManagement) and everything worked fine.
Now, I thought that its much easier to write a methode in model.py
which creates identity-accounts instead of using the tg-admin shell.
So I wrote a methode which does exactly the same as the tutorial said
in section "Using the Shell".
# in model.py
def createUserAccount():
# create TurboGears Identity user accounts
u1 = User(user_name='test', email_address='[EMAIL PROTECTED]',
display_name='test', password='test')
# create group
g1 = Group(group_name='TestGroup', display_name='TestGroup')
g1.addUser(u1)
The shell answeres with:
2007-09-26 16:12:05,202 turbogears.identity.soprovider INFO
Succesfully loaded "virtuelle_boerse.model.User"
2007-09-26 16:12:05,202 turbogears.identity.soprovider INFO
Succesfully loaded "virtuelle_boerse.model.Group"
2007-09-26 16:12:05,203 turbogears.identity.soprovider INFO
Succesfully loaded "virtuelle_boerse.model.Permission"
2007-09-26 16:12:05,203 turbogears.identity.soprovider INFO
Succesfully loaded "virtuelle_boerse.model.VisitIdentity"
That looks good, but if I try to login it doesn't work, so it seems
that the account is not stored in the database.
Does anybody know how to fix this?
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"TurboGears" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/turbogears?hl=en
-~----------~----~----~----~------~----~------~--~---