Thanks Mark,
I was able to put your suggestion in place and it seems to get me past
this particular hurdle.
What I did was moving this section from the app_cfg.py:
# what is the class you want to use to search for users in the
database
base_config.sa_auth.user_class = model.Users
# what is the class you want to use to search for groups in the
database
base_config.sa_auth.group_class = model.Roles
# what is the class you want to use to search for permissions in the
database
base_config.sa_auth.permission_class = model.Functions
into projectname.model.__init__.py somewhere towards the bottom of
init_model function definition, like so:
def init_model(engine):
...
from ccnod.config.app_cfg import base_config
# what is the class you want to use to search for users in the
database
base_config.sa_auth.user_class = Users
# what is the class you want to use to search for groups in the
database
base_config.sa_auth.group_class = Roles
# what is the class you want to use to search for permissions in
the database
base_config.sa_auth.permission_class = Functions
NOTE: do not forget the import as outlined above, and putting the
import in the outer scope won't work either.
So basically, we're delaying the initialization of the base_config
properties until the init_model got called.
Works for me :)
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---