On 2 Feb., 18:49, Gustavo Narea <[email protected]> wrote:
> On Monday February 2, 2009 18:21:24 Christoph Zwerschke wrote:
>
> > My idea was to let TG2 provide a request-aware sublass of the Predicate
> > class where the environ parameter is optional and set to request.environ
> > if not specified.
>
> But how are you going to do with the predicates themselves? They all will
> subclass Predicate, not the TG2 base predicate.
you might want to have
something like
class Predicate(object):
environ=None
class HasPermission(Predicate):
...
tg.predicates:
class RequestMixin: provide request info
class HasPermission(RequestMixin, generic.HasPermission):
def __init__(self,*args,**kwd):
generic.HasPermission.__init__(self,*args,**kwd)
Michael
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"TurboGears Trunk" 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-trunk?hl=en
-~----------~----~----~----~------~----~------~--~---