[web2py] Limit output of a details page to only show some items.

2012-08-23 Thread SeamusSeamus
I am trying to set a nice clean details page that only shows some basic information for a product. I do not want ALL information that is being storded (such as my slug, private notes field, etc..) to be visable to the customer. Now, I have this: def details(): try: equipment =

Re: [web2py] Limit output of a details page to only show some items.

2012-08-23 Thread Bruno Rocha
Considering this: def details(): try: equipment = db.equipment[int(request.args(0))] except: equipment = db(db.equipment.slug == request.args(0)).select(). first() return dict(equipment=equipment) Your view details.html should be h1{{=equipment.title}}/h1

Re: [web2py] Limit output of a details page to only show some items.

2012-08-23 Thread SeamusSeamus
Oh, very easy! Web2y is great! On Thursday, August 23, 2012 6:48:30 PM UTC-6, rochacbruno wrote: Considering this: def details(): try: equipment = db.equipment[int(request.args(0))] except: equipment = db(db.equipment.slug == request.args(0)).select(). first()