Hello list,

I've a customized identity model:

class Account(TG_User):
    _inheritable = False
    timezone = IntCol(default=0)
    ### Some other fields deleted for simplicity

I also have the following function in the model.py to simplify user
creation:

def user_create(username, password):
    user = Account(userId=username, password=password, emailAddress='',
            displayName=username)
    return user

When I launch  "tg-admin shell", and try to execute

user_create('test', 'test')

I receive the following exception:

RequestRequiredException: An attempt was made to use a facility of the
TurboGear
s Identity Management framework that relies on an HTTP request outside
of a requ
est.

Can somebody please clarify things a little bit? Why would a I need to
have an HTTP request just to insert a user in my model?

Thanks a lot,

Regards
Victor.


--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to