I assume it was designed not to call BEAUTIFY with a single item so you 
could use generic.html to display a "real" page (i.e., not just for 
development). BEAUTIFY isn't ideal for that because it displays the key for 
each item in _vars to the left of the rendered objects. Maybe it could test 
to see if the object is a string or has an xml() method, and not call 
BEAUTIFY in that case. And/or call BEAUTIFY with response._vars.values(), so 
the _vars key won't get displayed (maybe even do this when multiple items 
are in response._vars). Maybe there are other options...
 
Anthony

On Thursday, June 23, 2011 9:05:00 PM UTC-4, Massimo Di Pierro wrote:

> I do not oppose to the change. Anybody else pros or cons? 
>
> Massimo 
>
> On Jun 23, 7:10 pm, pbreit <[email protected]> wrote: 
> > Why doesn't generic.html beautify when len(vars)==1? When I send in one 
> > record, I'd like it to display beautified. 
> > 
> > {{if len(response._vars)==1:}} 
> > {{=response._vars.values()[0]}} 
> > {{elif len(response._vars)>1:}} 
> > {{=BEAUTIFY(response._vars)}} 
> > {{pass}}

Reply via email to