I don't know if you picked this up, but you don't seem to have row.id as 
part of the sqlfrom url.

Perhaps try: 
    links = [lambda row: A('Details',_href=URL('default','equipment', 
args=[row.id, row.slug]))]


On Tuesday, August 28, 2012 10:28:39 AM UTC+12, SeamusSeamus wrote:
>
> Okay, but do  I leave everything else alone? All I want to do is make it 
> www.mysite.com/equipment/id/title
> currently, title is set up as slug in the DB. What am I doing wrong. 
>
>  In my view:
>
>     equipment_id = request.args(0)
>     equipment_slug = request.args(1)
>     query = (db.equipment.id == item_id) & (db.equipment.slug == 
> item_slug)
>     item = db(query).select().first()
>     
>     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()
>
>
> and then my link in sqlform:
>
>     links = [lambda row: A('Details',_href=URL('default','equipment', 
> args=[row.slug]))]
>
>
>
>

-- 



Reply via email to