On Thu, 20 Apr 2006 17:54:57 -0000 "Victor Kryukov" <[EMAIL PROTECTED]> wrote:
> > 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. http://groups.google.com/group/turbogears/browse_thread/thread/e1cd7e5e8cb26bba/9f8ae06fbe07bd5a I asked the same question. I still don't have a good answer (or any really). I thought my proposed solution worked because of the way identity is already being used. Jason
signature.asc
Description: PGP signature