Please open a ticket about this. I am not sure whether this is the 
intended behavior. I need to check it.

On Monday, 12 November 2012 09:08:50 UTC-6, Maciej KwiecieĊ„ wrote:
>
>
> Dear All,
>
> In the web2py online book, in Chapter 3 - Overview, part 
> 'Image-Blog<http://web2py.com/books/default/chapter/29/03#An-image-blog>' 
> there 
> is the line of code:
>
> db.comment.image_id.writable = db.comment.image_id.readable = False
>
> Later, in the following part, "Adding 
> grids"<http://web2py.com/books/default/chapter/29/03#Adding-grids>the 
> SQLFORM.smartgrid is introduced.
>
> Unfortunately, because of the previous line of code, the smartgrid is not 
> working as advertised - the "Comments" link is not shown on the grid. 
>
> I've spent few hours looking for the reason (including debugging the 
> smartgrid code itself) to finally find out that smartgrid requires the 
> referenced / linked field to be "readable".
>
> 1. What is the reason for that? 
> The grid logic would work perfectly correct even with the 
> image_id.readable = False.
>
> 2. Is there a chance to mention that in the example in web2py book? 
> It was really frustrating for me to find out that the example from the 
> book doesn't work the way it supposed to.
>
> Thank you! 
> Maciej
>

-- 



Reply via email to