I added the code that checks for the presence of a request and throws, er, raises a more descriptive exception than IdentityManagementNotEnabledException, because Identity might actually BE enabled.
Basically, there's no identity provider (or you wouldn't be seeing an exception at all). On 29 Mar, 2006, at 7:11 pm, Jason Chu wrote: > For some reason I thought this was addressed before release. > > I'm pretty sure I'm running everything up to date. > > With a newly quickstarted project, visit and identity enabled, and > having run the app once (to actually create the tg_* tables, I run > tg-admin shell and try to create a TG_User. I'm getting this error: > >>>> TG_Group(groupId='a', displayName='a') > <TG_Group 1 groupId=u'a' displayName=u'a' > created='datetime.datetime...)'> >>>> TG_User(userId='a', password='a', displayName='a', >>>> group=TG_Group.get(1), emailAddress='a') > Traceback (most recent call last): > File "<console>", line 1, in ? > File "/home/jchu/coding/sqlobject/trunk/sqlobject/declarative.py", > line 93, in _wrapper return_value = fn(self, *args, **kwargs) > File "/home/jchu/coding/sqlobject/trunk/sqlobject/main.py", line > 1214, in __init__ self._create(id, **kw) > File > "/home/jchu/coding/sqlobject/trunk/sqlobject/inheritance/__init__.py", > line 302, in _create super(InheritableSQLObject, self)._create(id, > **kw) File "/home/jchu/coding/sqlobject/trunk/sqlobject/main.py", line > 1240, in _create self.set(**kw) File > "/home/jchu/coding/sqlobject/trunk/sqlobject/main.py", line 1106, in > set setattr(self, name, value) File > "/home/jchu/coding/turbogears/turbogears/identity/soprovider.py", line > 298, in _set_password hash = > identity.current_provider.encrypt_password(cleartext_password) File > "/home/jchu/coding/turbogears/turbogears/identity/__init__.py", line > 79, in __getattr__ raise RequestRequiredException() > RequestRequiredException: An attempt was made to use a facility of the > TurboGears Identity Management framework that relies on an HTTP > request > outside of a request. > > Just skimming the code, it looks like the provider is created by > calling create_default_provider. Can't we just call that when > initing the shell? > > Jason -- Jeff Watkins http://newburyportion.com/ Democracy n: A country where the newspapers are pro-American. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---

