On Wednesday, June 8, 2011 11:24:42 AM UTC-4, Ross Peoples wrote: 
>
> I just got hit by this change. I think the original reason why it never 
> showed the toolbar for a single returned item was to make web2py easier to 
> use. I'll give a use case: 
>
> You want to create a simple form, so in a controller you do the following:
>
> form = SQLFORM(db.table)
> return dict(form=form)
>
> Before, your form would just show up. Since the change in the trunk, you 
> now need to create a view for this:
>
> {{extend 'layout.html'}}
> {{=form}}
>
> Otherwise, you'll get a view with the toolbar and the variable name, 'form' 
> to the left of the actual form.
>
 
If you return a single item in the dict (i.e., just form=form), the word 
"form" should not appear to the left of the form, even with the recent 
change to generic.html (BEAUTIFY only gets called if len(response._vars)>1). 
The toolbar will show up, though, but only if the request is from the local 
host, so it shouldn't show up in production. I suppose if you don't want it 
at all, you could just edit generic.html.
 
Anthony

Reply via email to