Yeah, might not be a bad idea to show an explicit example like this in a
slice. The book only includes a note about making editable, deletable, and
details callables instead of booleans.
Anthony
On Sunday, April 28, 2013 2:28:18 PM UTC-4, Alex Glaros wrote:
>
> Thanks so much Anthony, it works great!
>
> Is this valuable enough for me to post to Slices? (I would also display
> the tables so that students can recreate the whole process).
>
> def search_shared_services():
> is_owner = (lambda row: row.created_by == auth.user_id) if auth.user
> else False
> grid = SQLFORM.smartgrid(db.SharedService, linked_tables=[
> 'SharedServicePartnerIntersection'], maxtextlength={
> 'SharedServicePartnerIntersection.sharedServiceID':140,
> 'SharedService.shortSharedServiceTitle':140,
> 'SharedService.shortSharedServiceDescription':140},
> editable=is_owner,deletable
> =is_owner, user_signature=True)
> return dict(grid=grid)
>
>
> Thanks,
>
> Alex
>
>
--
---
You received this message because you are subscribed to the Google Groups
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.