1.96.1 -- see http://www.web2py.com/examples/default/changelog

On Wednesday, July 6, 2011 10:33:12 AM UTC-4, Oskari wrote:

> When has this behaviour changed? I can't seem to find it on log 
>
> On Jun 17, 7:33 pm, Jose <jja...@gmail.com> wrote: 
> > On 17 jun, 11:35, Anthony <abas...@gmail.com> wrote: 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > > On Friday, June 17, 2011 10:16:16 AM UTC-4, Jose wrote: 
> > 
> > > > Hi, 
> > 
> > > > In later versions of the trunk the default view does not work. If I 
> > > > create a function without creating ls associated view, should load 
> the 
> > > > default view, well, this is what fails. [invalid view] 
> > 
> > > Are you having this problem with requests on the local machine, or only 
>
> > > remote requests? Due to a security vulnerability, generic views are 
> turned 
> > > off by default unless the request is local. In db.py of the 'welcome' 
> app, 
> > > the following has been added: 
> > 
> > >response.generic_patterns= ['*'] if request.is_local else [] 
> > 
> > >response.generic_patternsis a list of glob patterns that can be used to 
> > > match /controller/function.extension to determine which generic views 
> should 
> > > be available for which controllers and functions. The above line allows 
> all 
> > > generic views, but only when request.is_local is True. You can set the 
> > > generic_patterns centrally in a model file (as above), or you can set 
> it 
> > > within specific controllers or functions. For example: 
> > 
> > > In default.py: 
> > 
> > > def myaction(): 
> > >    response.generic_patterns= ['html', 'load'] 
> > >     # more code 
> > >     return dict(...) 
> > 
> > > The above will enable generic.html and generic.load views specifically 
> for 
> > > requests to /default/myaction.[html/load]. 
> > 
> > > Anthony 
> > 
> > Thanks Anthony.

Reply via email to