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 =
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
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()
3 matches
Mail list logo