On Sep 12, 2011, at 6:10 PM, Bruno Rocha wrote: > do you have response.generic_patterns = ['*'] in your models?
The stock line (for security) is response.generic_patterns = ['*'] if request.is_local else [] > > On Mon, Sep 12, 2011 at 9:50 PM, HughBarker <hbar...@gmail.com> wrote: > Hi all, > So I've got a controller that builds a dict of strings and returns > them - although I'm building the dict dynamically, essentially what > I'm doing is this: > > def getsensors(): > d = {'airTemp' : 'Air Temperature', 'PAR' : 'PAR', > 'IMOSPortRadiometer' : 'IMOS Port Radiometer'} > return d > > When I call the URL, ie ../default/getsensors, I get 'invalid view > (default/getsensors.html)'. > > My understanding was that if a dict is returned from a controller and > you call the appropriate URL, the dict will get processed and > displayed on screen (ultimately what I'm trying to do is call > getsensors.json and process the returned JSON, kind of like Example 3 > at http://web2py.com/examples/default/examples). > > I've played around with this a fair bit now, and I can't understand > why it isn't working. I'm sure it's some elementary mistake on my > part, but any help would be appreciated. > > -Hugh > > > > -- > > > > -- > Bruno Rocha > [ About me: http://zerp.ly/rochacbruno ] > [ Aprenda a programar: http://CursoDePython.com.br ] > [ O seu aliado nos cuidados com os animais: http://AnimalSystem.com.br ] > [ Consultoria em desenvolvimento web: http://www.blouweb.com ] >