I am confused in your original email you asked about {{=products}} but
this code shows {{=form}} and {{=records}}. I do not believe the image
you posted was generated by this code.

Anyway... your action should probably be

def purchase_product():
     form = SQLFORM(db.product,fields=['location'])
     if form.accepts(request.vars,session):
         session.flash='record inserted'
         redirect(URL(r=request))
     records=db(db.product.location==request.vars.location)\
             .select(orderby=db.product.long_name)
     return dict(form=form,records=records)

i.e. add accept, redirect upon acceptance, compute records only if
displayed.

In general records can be serialized {{=records}} but need to
customize the look-n-feel via CSS or via something like

{{for record in records:}}{{=record.location}}<br/>{{pass}}

Massimo

On Mar 2, 7:29 am, Jason Brower <[email protected]> wrote:
> Controller...
> ----
> def purchase_product():
>     records=db(db.product.location==request.vars.location)\
>             .select(orderby=db.product.long_name)
>     form = SQLFORM(db.product,fields=['location'])
>     return dict(form=form,records=records)
> ----
> View...
> ----
> {{extend 'layout.html'}}
> <h1>Purchase a product for a customer below.</h1>
> {{=form}}
> {{=records}}
> ----
>
> On Mon, 2009-03-02 at 04:20 -0800, mdipierro wrote:
> > Can you show the controller and the view code?
>
> > On Mar 2, 4:19 am, Jason Brower <[email protected]> wrote:
> > > I have the following on the screen.
> > > I thought that in my view I could make..
> > > {{=products}} and it would make a nice table of the content.  But I
> > > guess I was wrong. :(  What can I do to make it display properly?
> > > Best Regards,
> > > Jason Brower
>
> > >  Screenshot.png
> > > 189KViewDownload
>
> > >  error.png
> > > 299KViewDownload
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"web2py Web Framework" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to