This runs into a problem where if I have two items of the same 'title', the
user will only be linked to the first one that was created. Can I make it
so the slug is a field that I designate? Or make it so the slug adds a
incrementing number such as:
Field('slug', compute=lambda row: IS_SLUG()(row.title *+ row.id*)[0])
I know thats not how you do it, but do you get what I mean? Is there a
better way?
On Thursday, August 23, 2012 1:18:16 AM UTC-6, Anthony wrote:
>
> links = [lambda ro
>> w: A('Details',_href=URL('default','show', args=[row.slug]))]
>> fields = [db.equipment.category, db.equipment.title,
>> db.equipment.price]
>>
>
> You have not included "slug" in your list of fields, so I believe it will
> not be included in the data query. Instead of specifying the list of
> fields, you can set the readable attribute to False for fields you don't
> want displayed (including "slug"). In that case, all fields will be
> included in the query (including "slug"), but only the fields you want to
> show will be visible in the grid.
>
> Anthony
>
--