Bruce Webber schrieb:
> 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>
In the current versions of TG2/repoze.what, this should work as you
expect - predicates are now evaluated as booleans.
-- Christoph
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---