Re: add_route and view_attr

2011-04-10 Thread Eric Lemoine
On Thu, Apr 7, 2011 at 8:20 PM, Michael Merickel wrote: > To solve your problem you probably just need to remove the view_attr from > add_route and call config.scan(). > The problem here is the ambiguity in add_route because it supports routes > and the ability to add a single view. Rather add_vie

Re: add_route and view_attr

2011-04-07 Thread Michael Merickel
To solve your problem you probably just need to remove the view_attr from add_route and call config.scan(). The problem here is the ambiguity in add_route because it supports routes and the ability to add a single view. Rather add_view and view_config are identical except that view_config requires

Re: add_route and view_attr

2011-04-07 Thread Eric Lemoine
On Thursday, April 7, 2011, Gael Pasgrimaud wrote: > Hi, > > On Thu, Apr 7, 2011 at 4:47 PM, Eric Lemoine > wrote: >> Hi >> >> I have view class defined as follows: >> >> class Entry(object): >>    def __init__(self, request): >>        self.request = request >>        self.debug = "debug" in req

Re: add_route and view_attr

2011-04-07 Thread Gael Pasgrimaud
Hi, On Thu, Apr 7, 2011 at 4:47 PM, Eric Lemoine wrote: > Hi > > I have view class defined as follows: > > class Entry(object): >    def __init__(self, request): >        self.request = request >        self.debug = "debug" in request.params >        lang = request.params.get("lang", >          

add_route and view_attr

2011-04-07 Thread Eric Lemoine
Hi I have view class defined as follows: class Entry(object): def __init__(self, request): self.request = request self.debug = "debug" in request.params lang = request.params.get("lang", request.registry.settings.get("default_locale_name"))