It is not exactly identical, but changing the following line in my
controller item.py, function edit:
thispage = db.table[request.args(0)]
with:
thispage = db(db.table.fieldname==request.args(0)).select().first()
provides me with the result I was waiting for for a URL like:
Here is a way of editing records with non id fields:
In the view construct a URL with the record's field value:
{{ =A(edit, URL(controller, edit function, table name,
field value)) }}
Then, on the controller, you have to get the record by the field
value:
r = db(db[request.args(0)].field name
2 matches
Mail list logo