Hi Richard, What does your config file look like? I ask because I want to be sure that identity.on = True for the path in question. (Remember that CherryPy allows config values to vary by path...)
Kevin On 3/21/06, Richard (koorb) <[EMAIL PROTECTED]> wrote: > > The project I am working on at the moment uses a controllers package, > the directory contains __init__.py controllers.py and > otherControllers.py > > The login and logout controllers remain in controllers.py while the > otherControllers.py uses identity.require quite happily. So what's the > problem? I have another package called forms in which I declare my form > schema's. This works fine until I try to use identity in there: > > import turbogears > from turbogears import identity, widgets > from myProject import model > > then for a SingleSelectField I want to output a list of groups the > current user is in > > options=[(group.id, group.displayName) for group in > identity.current.groups] > > sadly this results in > > turbogears.identity.exceptions.IdentityManagementNotEnabledException: > An attempt was made to use a facility of the TurboGears Identity > Management framework but identity management hasn't been enabled in the > config file [via identity.on]. > > It is and I have been using it successfully what is different about > using it in this package? is it a name space issue? I don't know. I > hope I'm not doing something stupid but if this is something other may > run into as well it's good to talk about it. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---

