In a TG2 controller method I'm trying to write code like:
from repoze.what import predicates
# ...
if (predicates.has_permission('view_convention')):
# do somethng here
but this doesn't work. has_permission() evaluates to True, because it
returns an object:
<repoze.what.predicates.has_permission object at 0x2080290>
After looking at the repoze.what documentation I tried calling an
is_met() method of has_permission(), but received an error stating
that there was no is_met() method.
How do I get a True or False from has_permission()?
Regards,
Bruce
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---