[web2py] Re: Internal Error if args are not passed

2012-08-29 Thread Anthony
{{if equipment:}} [code to display equipment] {{pass}} Anthony On Thursday, August 30, 2012 1:03:00 AM UTC-4, SeamusSeamus wrote: > > Sure... > > controller > . > try: > equipment = db.equipment[int(request.args(0))] > except: > equipment = db.equipment(request.args(0)

[web2py] Re: Internal Error if args are not passed

2012-08-29 Thread SeamusSeamus
Sure... controller . try: equipment = db.equipment[int(request.args(0))] except: equipment = db.equipment(request.args(0)) or db(db.equipment.slug == request.args(0)).select().first() view: {{extend 'layout.html'}} {{=equipment.title}} . . {{=equipment.d

[web2py] Re: Internal Error if args are not passed

2012-08-29 Thread Anthony
I think we have to see what your function is returning and what the view is doing with it to answer that one. On Thursday, August 30, 2012 12:02:46 AM UTC-4, SeamusSeamus wrote: > > Hi, > I am passing args from my SQLForm to a page (details.html) which pretty > much shows 'details' about a prod